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

[SEO] 支持 Canonical URL #1038

Open
2 tasks done
AnzhiZhang opened this issue Dec 31, 2023 · 0 comments
Open
2 tasks done

[SEO] 支持 Canonical URL #1038

AnzhiZhang opened this issue Dec 31, 2023 · 0 comments
Labels
✨ enhancement New feature request

Comments

@AnzhiZhang
Copy link

如是功能需求,请确定符合以下情况

  • 难以通过自定义实现
  • 难以通过第三方插件实现

请描述该需求尝试解决的问题

在 head 中提供 Canonical URL:https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls?visit_id=638396256870362030-1024112630&rd=1&hl=zh-cn

<link rel="canonical" href="{{ config.url }}/xxxxx"/>

请描述您认为可行的解决方案

参考:https://github.com/iissnan/hexo-theme-next/pull/931/files

考虑过的替代方案

尝试过以下两个插件:
https://github.com/tarunbatra/hexo-canonical-link
https://github.com/HyunSeob/hexo-auto-canonical

都需要修改 layout,我尝试在 custom_head 中添加,但未成功。如果自己修改 layout,需要维护 fluid 的升级并合并更改,希望可以从主题层面实现功能。

@AnzhiZhang AnzhiZhang added the ✨ enhancement New feature request label Dec 31, 2023
zkqiang added a commit that referenced this issue Jan 30, 2024
zkqiang added a commit that referenced this issue Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature request
Projects
None yet
Development

No branches or pull requests

1 participant