【问题标题】:Jekyll - exclude folder, but include subfolderJekyll - 排除文件夹,但包含子文件夹
【发布时间】:2013-02-15 15:23:31
【问题描述】:

我有这样的结构:

folder/
folder/subfolder/

我想从文件夹/中排除所有内容,文件夹/子文件夹/除外。

我有什么办法可以用 Jekyll 做到这一点?我尝试了一些组合,但都不起作用,例如:

exclude: ["folder"]
include: ["folder/subfolder"]

感谢您的帮助!

【问题讨论】:

  • 目前不可能。
  • 无赖:(我希望这是可能的
  • 确实,我认为您目前最好的选择是将子文件夹放在文件夹之外并使用正常排除处理文件夹内容
  • 你可能想在这里称重:github.com/jekyll/jekyll/issues/4791
  • 您可以以下划线开头所有其他文件夹名称,因此您将拥有folder/_somefolderfolder/_someotherfolderfolder/subfolder

标签: jekyll


【解决方案1】:

从 Jekyll 版本 4.X 开始,它 now possible to include subfolders and exclude base folder 就像 OP 在帖子中所做的那样。

【讨论】:

    猜你喜欢
    • 2021-06-28
    • 2018-04-10
    • 1970-01-01
    • 2015-09-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-24
    • 1970-01-01
    相关资源
    最近更新 更多