Jekyll: Include a file from directory outside of _includes

后端 未结 7 1534
陌清茗
陌清茗 2021-02-07 03:34

I have an directory called /patterns in my Jekyll site, whose structure generally looks generally like this:

_includes _layouts _site /patterns index

7条回答
  •  醉梦人生
    2021-02-07 03:40

    You can change the directory that the include tag uses with includes_dir in your _config.yml. It doesn't look like you can set multiple paths (source: https://jekyllrb.com/docs/configuration/).

    In any case, the files in _includes don't end up in your output. You could separate pattern-specific includes into _includes/patterns/, but the only thing that'd have any effect on your live site would be where those files were included.

提交回复
热议问题