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

WIP fix: use canonical url for pages #59

Closed
wants to merge 1 commit into from

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Jul 10, 2019

Remove index.html from url of pages. Fixes #13. Based on https://github.com/pyyzcwg2833/hexo-generator-sitemap/commit/a92dbbb83cc39ff60d43faa5cd688a56574a3889 (credit @pyyzcwg2833).

Added test for pages (closes #62). Updated the updated attribute of hexo.init() in the test for more predictable result.

The affected code uses ES2018 feature (which is Node 8 supports). Refactor everything else to ES6 should be in a separate PR.

Feel free to refactor .concat() and array-object-array conversion to something better.

"ecmaVersion": 2018 can be removed once another PR hexojs/eslint-config-hexo#16 has been released (eslint-config-hexo@4).

Pull request tasks

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

@coveralls
Copy link

coveralls commented Jul 10, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 7e6212c on curbengh:canonical into c5f7c55 on hexojs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 45a5c1d on weyusi:canonical into 077e375 on hexojs:master.

@tomap
Copy link
Contributor

tomap commented Sep 11, 2019

LGTM, except the conflict :)

@curbengh curbengh force-pushed the canonical branch 4 times, most recently from aed9a3d to 7e6212c Compare September 11, 2019 06:57
@curbengh
Copy link
Contributor Author

Rebased.

@curbengh curbengh requested a review from tomap September 11, 2019 08:57
@SukkaW
Copy link
Member

SukkaW commented Sep 11, 2019

Might wait hexojs/hexo#3691 ?

@curbengh curbengh removed the request for review from tomap September 11, 2019 09:43
@curbengh curbengh changed the title fix: use canonical url for pages WIP fix: use canonical url for pages Sep 11, 2019
@curbengh
Copy link
Contributor Author

you're right, this PR is not necessary in hexojs/hexo#3691

@curbengh
Copy link
Contributor Author

hexojs/hexo#3691

@curbengh curbengh closed this Sep 24, 2019
@curbengh curbengh deleted the canonical branch September 24, 2019 07:33
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.

page 页面URL格式问题
4 participants