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

Permalink issues #1813

Closed
leesei opened this issue Mar 7, 2016 · 5 comments · Fixed by #4359
Closed

Permalink issues #1813

leesei opened this issue Mar 7, 2016 · 5 comments · Fixed by #4359
Labels
bug Something isn't working discussion question Needs help in usage

Comments

@leesei
Copy link
Member

leesei commented Mar 7, 2016

This is an umbrella issue pertaining permalink in Hexo.
We should document how permalink (or link in general) is resolved from config.permalink, post.permalink file name, slug, title.
These cause quite a bit of confusion for the users and escaping of special characters.
#1812
#1608
#1110
#881 / #1258

hexojs/hexo-generator-sitemap#1 Use URL safe characters (slug should be serving this purpose)
hexojs/hexo-generator-sitemap#13 Use permalink as canonical URL (in HTML header and sitemap)
#1822 . in post file name

@leesei leesei added bug Something isn't working discussion labels Mar 7, 2016
@leesei
Copy link
Member Author

leesei commented Mar 15, 2016

From #1822, I recommend issuing a warning for posts and assets with non-URL safe characters (slugtize(filename) !== filename).
We can inform users to use post.permalink instead.

@Ether0xF
Copy link

I see this is an umbrella issue, so I decide to append the issue here as discussion instead of posting a new (and duplicated) one.
The permalink overriding bug, refers to #1110 and #1158, was still happening in my hexo project as hexo version 3.2.2.
In config.yml, my permalink is:

permalink: :category/:year-:month-:day/

In front-matter, I set the permalink like:

permalink : /title-I-want/

but it did not override the permalink in config.yml.
I'm wondering that if I set the value in an appropriate format. What exactly the format is?

Solution provided by @liudongkai was not a handy one that I expected, since I have 180+ posts that migrated from wordpress. Re-assign a permalink to each post manually sounds incredible...
Any other suggestions would be very appreciated.

@curbengh
Copy link
Contributor

curbengh commented Aug 30, 2019

In front-matter, I set the permalink like:

permalink : /title-I-want/

but it did not override the permalink in config.yml.

can confirm (I'm assuming you're talking about post). It only override the :title/ part of config.yml.

@icpz
Copy link

icpz commented Mar 2, 2020

Any updates? Seems that the issue is still there in hexo 3.8

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jun 14, 2020

There is a discussion about it: #3464
I'm closing this issue. Please join the discussion there :)

Update: Fixed in #4359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion question Needs help in usage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants