2015-10-16 51 views
1

我目前正在开发一个Jekyll供电站点,并且在我的Jekyll本地服务器上工作的线路permalink: /:path/不能通过配置(_config.yml)或在对于GitHub页面中的每个页面(file.md),YAML前端事项。他们成为字面输出为example.com/:path/而不是example.com/dir-name/在GitHub中工作的Jekyll固定链接页面

我试过permalink: "/:path/"但仍不能正常工作,some said that some permalink will not work in the Jekyll version of GitHub。经研究,GitHub Pages有一个2.4.0的Jekyll版本,可以在its "Dependency versions" page找到。 Jekyll网站上的GitHub Pages documentation也没有提到这一点。

任何人都知道GitHub Pages中的工作Jekyll permalinks的确切列表,所以我可以选择在我的项目和未来的读者中使用哪些固定链接?

回答

2

在jekyll 2.4中,您只需为页面配置永久链接即可。

读这里page.rb::template代码就是我们有:

没有永久变量 - >/:path/:basename:output_ext

永久VAR设置为:pretty

  • 的index.html - >/:path/(/文件夹/等/指数.html - >/folder/other /)
  • other.html - >/:path/:basename/(/folder/toto/other.html - >/folder/toto/other /)
  • code.js - >/:path/:basename:output_ext(/folder/code.js - > /folder/code.js)

我相信杰基尔3将成为下一个GitHub的网页版本的所有未来你在看documentation

相关问题