Excluding a directory from Jekyll watch

后端 未结 2 1875
轻奢々
轻奢々 2021-01-04 12:00

I\'m using Jekyll 3.1.1 to generate a blog and I recently introduced a Git hook to automatically publish changes pre-push.

After introducing this hook, I have starte

相关标签:
2条回答
  • 2021-01-04 12:26

    The value for exclude parameter in _config.yml should be an array i.e.

    exclude: ['_site', 'node_modules', ...]
    

    Source: Jekyll Documentation - Configuration

    0 讨论(0)
  • 2021-01-04 12:38

    Try this to your _config.yml:

    keep_files: [node]
    

    where node is a folder to exclude from the --watch. What this will do is keeping the folder node untouched by jekyll build. Then add all files that you want to keep in the site root but not rendered by Jekyll.

    0 讨论(0)
提交回复
热议问题