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

feat(permalink): pretty_urls.trailing_html #3893

Closed
wants to merge 2 commits into from

Conversation

curbengh
Copy link
Contributor

What does it do?

Continuation of #3691

When pretty_urls.trailing_html is disabled, permalink like example.com/foo/bar.html is transformed into example.com/foo/bar/. Trailing slash is appended for now, pretty_urls.trailing_slash can be introduced in later PR.

The option doesn't apply to url with trailing index.html, e.g. example.com/foo/bar/index.html. I don't think example.com/foo/bar/index/ is valid.

How to test

git clone -b trailing-html https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.132% when pulling 335d9cc on curbengh:trailing-html into 6216d05 on hexojs:master.

@SukkaW
Copy link
Member

SukkaW commented Dec 2, 2019

Since codeclimate detects too many duplicated code blocks, we could bring up a pretty_url(input, [options]) in hexo-util.

@curbengh
Copy link
Contributor Author

curbengh commented Dec 7, 2019

hexojs/hexo-util#152

@curbengh curbengh closed this Dec 7, 2019
@curbengh curbengh deleted the trailing-html branch December 7, 2019 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants