Skip to content

New canonical tag helper#1143

Merged
1v9 merged 2 commits intomasterfrom
can
Oct 19, 2019
Merged

New canonical tag helper#1143
1v9 merged 2 commits intomasterfrom
can

Conversation

@1v9
Copy link
Member

@1v9 1v9 commented Aug 30, 2019

Issue resolved: #866

@1v9
Copy link
Member Author

1v9 commented Aug 31, 2019

https://github.com/hexojs/hexo-pagination/blob/8b91a5cc0ddb0dfd0cbd1d708322569803eb23ef/lib/pagination.js#L16

https://github.com/hexojs/hexo-generator-index/blob/569bbb2c22a4d595682ba1014f5192173b4b7e36/lib/generator.js#L13

GitHub
Pagination utilities for Hexo generator plugins. Contribute to hexojs/hexo-pagination development by creating an account on GitHub.
GitHub
Index generator plugin for Hexo. Contribute to hexojs/hexo-generator-index development by creating an account on GitHub.

@1v9
Copy link
Member Author

1v9 commented Aug 31, 2019

{{ page.permalink }} works on every page exclude index and archive page.
{{ url }} is everythere.

@curbengh
Copy link

curbengh commented Sep 2, 2019

Wait for hexojs/hexo#3691

Most likely the option won't be backported to Hexo v3. Besides, this PR doesn't conflict with that option; assuming index.html only appear once at the end of url, String.replace(/index\.html$/, '').replace(/index\.html$/, '') still produces similar result.

@stevenjoezhang stevenjoezhang modified the milestones: v8.0.0, v7.4.1 Sep 18, 2019
@theme-next theme-next deleted a comment Sep 18, 2019
@stevenjoezhang
Copy link
Contributor

hexojs/hexo#3691 (comment)

permalink (endsWith '.html')
trailing_html
trailing_slash

What's the difference? Which is the recommended one?

@SukkaW
Copy link

SukkaW commented Sep 18, 2019

@stevenjoezhang I have just updated that explanations:

trailing_html (When disabled, /about.html => /about)
trailing_slash (When disabled, /about/ => /about)

@stevenjoezhang
Copy link
Contributor

@SukkaW Thank you. It'll be great if these features can be added to Hexo at the next release

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Sep 27, 2019

Pending Hexo v4.0 release.

@1v9 1v9 reopened this Oct 19, 2019
@theme-next theme-next deleted a comment Oct 19, 2019
@1v9 1v9 added this to the v7.5.0 milestone Oct 19, 2019
@1v9 1v9 merged commit d5149a3 into master Oct 19, 2019
@delete-merged-branch delete-merged-branch bot deleted the can branch October 19, 2019 14:40
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Causing SEO confusion by setting canonical to true

5 participants