Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
feat(permalink): add pretty_urls option to remove index.html from url #3691
What does it do?
This is useful for SEO when web server (including
This way, plugins that use post.permalink don't need to remove it. Tested with hexo-generator-sitemap.
Note this PR doesn't cover
pretty_urls: trailing_index: true
How to test
git clone -b canonical https://github.com/curbengh/hexo.git cd hexo npm install npm test
Pull request tasks
Maybe we can find more better naming.
And I would like to implement a trailing slash option.
_config.yml # following namings are an example. url_trailing: include_html: true # https://example.com/foo/index.html slash: true # This option will be enabled if include_html is false. https://example.com/foo/
If we implement this idea user can select which they use from three patterns url.
But, I'm worry followings if implement trailing slash option.
How do you think?
I'm aware of that, what I meant is the end goal is the same, which is to tell the links to search engines or readers that the links without "index.html" is the canonical version.
I dismissed the idea
But I do like the suggestion by @YoshinoriN
trailing_url: include_html: true trailing_slash: true