Skip to content

feat(permalink): pretty_urls.trailing_html#3893

Closed
curbengh wants to merge 2 commits intohexojs:masterfrom
curbengh:trailing-html
Closed

feat(permalink): pretty_urls.trailing_html#3893
curbengh wants to merge 2 commits intohexojs:masterfrom
curbengh:trailing-html

Conversation

@curbengh
Copy link
Copy Markdown
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
Copy Markdown

Coverage Status

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

@SukkaW
Copy link
Copy Markdown
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
Copy Markdown
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