我有一个Jekyll项目,其中包含一个git子模块foobar
,其中包含一些需要渲染的markdown文件以及主repo中的文件。这些文件包含./foobar/docs/current/module-1.md
之类的路径。
使用当前的url方案,这意味着他们获得路径/foobar/docs/current/module-1.md
,但我宁愿拥有更短的路径/current/module-1.md
。这是否可以使用Github Pages附带的标准Jekyll安装?
答案 0 :(得分:2)
您可以使用default configuration值为foobar文件夹设置permalink。
在_config.yml
中,添加:
defaults:
-
scope:
path: "foobar/docs/current"
type: "pages"
values:
permalink: /current/:basename