Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/177.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
具有基于文件名的url的Jekyll permalink_Jekyll_Permalinks - Fatal编程技术网

具有基于文件名的url的Jekyll permalink

具有基于文件名的url的Jekyll permalink,jekyll,permalinks,Jekyll,Permalinks,我需要一些关于jekyll permalinks的帮助。我有一篇帖子名为:datemytitle.md 在里面我有: --- title: My beautiful extended title --- 在\u config.yml中,我定义了 permalink: /:categories/:title 因此,jekyll似乎忽略了文件名,而不是获取/my title,而是获取/my beautiful extended title 我如何告诉jekyll使用文件名url而不是titl

我需要一些关于jekyll permalinks的帮助。我有一篇帖子名为:
datemytitle.md
在里面我有:

---
title: My beautiful extended title
---
\u config.yml
中,我定义了

permalink:   /:categories/:title
因此,jekyll似乎忽略了文件名,而不是获取
/my title
,而是获取
/my beautiful extended title


我如何告诉jekyll使用文件名url而不是
title
属性本身?

如果您在前面设置了一个标题,这就是用于生成文件名的标题。
如果您想使用文件名作为生成的文件名,请不要使用前件标题。这是唯一的方法。

将永久链接设置为使用
:name

您的
\u config.yml

permalink://:categories/:name
是的,似乎是这样:(我最后做的是在前面创建一个名为“url”的新属性,这样我的永久链接看起来像/:categories/:url,我可以保留title属性来创建显示实际标题的页面。