[英]List of the working Jekyll permalinks in GitHub Pages
我目前正在开发一个由Jekyll驱动的站点,并且在我的Jekyll本地服务器上运行的permalink: /:path/
行permalink: /:path/
,无法通过Configuration (_config.yml)或每个页面的YAML Front Matter (文件)运行(.md)。 它们从字面上输出为example.com/:path/而不是example.com/dir-name/ 。
我尝试了permalink: "/:path/"
但仍然无法正常工作, 有人说某些永久链接在GitHub的Jekyll版本中不起作用 。 经过研究,GitHub Pages的Jekyll版本为2.4.0,可以在其“ Dependency版本”页面中找到 。 Jekyll网站上的GitHub Pages文档中也没有提及这一点。
谁都知道GitHub Pages中可以使用的Jekyll永久链接的确切列表,因此我可以选择在我的项目中以及将来的读者中使用哪些永久链接?
在jekyll 2.4中,您只需要为页面配置永久链接即可。
阅读page.rb::template
代码,这就是我们所拥有的:
没有固定链接变量-> /:path/:basename:output_ext
永久链接var设置为:pretty
/:path/
(/folder/other/index.html-> / folder / other /) /:path/:basename/
(/folder/toto/other.html-> / folder / toto / other /) /:path/:basename:output_ext
(/folder/code.js-> /folder/code.js) 我相信jekyll 3将是下一个github页面版本,其中包含您在文档中看到的所有内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.