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 #3917

Merged
merged 4 commits into from Dec 10, 2019
Merged

Conversation

@curbengh
Copy link
Contributor

curbengh commented Dec 9, 2019

What does it do?

Continuation of #3691.
Utilize prettyUrls() introduced in hexojs/hexo-util#152 (credit @SukkaW)
Supersede #3893

When pretty_urls.trailing_html is disabled, permalink like example.com/foo/bar.html is transformed into example.com/foo/bar.

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 pretty_urls-util 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.
curbengh added 2 commits Dec 9, 2019
@coveralls

This comment has been minimized.

Copy link

coveralls commented Dec 9, 2019

Coverage Status

Coverage decreased (-0.009%) to 97.13% when pulling e6955d3 on curbengh:pretty_urls-util into 219fded on hexojs:master.

lib/models/category.js Outdated Show resolved Hide resolved
@curbengh curbengh changed the title refactor(permalink): prettyUrls of hexo-util feat(permalink): pretty_urls.trailing_html Dec 9, 2019
@curbengh curbengh marked this pull request as ready for review Dec 9, 2019
@curbengh curbengh force-pushed the curbengh:pretty_urls-util branch from fc1fc7a to e6955d3 Dec 10, 2019
@SukkaW
SukkaW approved these changes Dec 10, 2019
@SukkaW SukkaW merged commit 140ed36 into hexojs:master Dec 10, 2019
3 of 4 checks passed
3 of 4 checks passed
coverage/coveralls Coverage decreased (-0.009%) to 97.13%
Details
Travis CI - Pull Request Build Passed
Details
codeclimate 4 fixed issues
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@curbengh curbengh deleted the curbengh:pretty_urls-util branch Dec 10, 2019
@curbengh

This comment has been minimized.

Copy link
Contributor Author

curbengh commented Dec 10, 2019

There's a failing test due to incomplete #3921, I'll fix it.

Edit: #3924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.