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

Conversation

curbengh
Copy link
Contributor

@curbengh 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.

@coveralls
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 December 9, 2019 23:38
SukkaW
SukkaW previously approved these changes Dec 10, 2019
@SukkaW SukkaW merged commit 140ed36 into hexojs:master Dec 10, 2019
@curbengh curbengh deleted the pretty_urls-util branch December 10, 2019 12:15
@curbengh
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants