Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新版_config.yml的"permalink:"的错误 #1110

Closed
naog opened this issue Mar 13, 2015 · 4 comments
Closed

新版_config.yml的"permalink:"的错误 #1110

naog opened this issue Mar 13, 2015 · 4 comments

Comments

@naog
Copy link

naog commented Mar 13, 2015

permalink: :title.html
会识别成“文件名.html”
无视“_posts”中的文章页头“title: XXX”
且无视“permalink: url”重写

@Xuanwo
Copy link
Contributor

Xuanwo commented Mar 23, 2015

http://hexo.io/zh-cn/docs/permalinks.html#变量

这不是BUG,Hexo本身就是这样的设定,:title 文件名称
所以要是想要用文章标题做链接的话,就用文章标题来命名你的MD文件吧。

@naog
Copy link
Author

naog commented Mar 24, 2015

@Xuanwo
http://hexo.io/zh-cn/docs/front-matter.html
Front-matter中的permalink参数的描述为覆盖文章网址,在3.0中也不能覆盖。

@liudongkai
Copy link

@naog

我也碰到了一样的问题,这几天经过测试发现,2.x的 post permalink 参数应该变量名冲突了,在post里命名一个新的、不冲突的参数就可以了,比如 permalinks

_config.yml

permalink: :permalinks/

source/_posts/hello-world.md

title: Hello world
permalinks: world2

url => http://yourdomain/world2/

@Xuanwo
Copy link
Contributor

Xuanwo commented Apr 11, 2015

@naog Hello, @liudongkai 的方法能解决问题么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants