Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added Support for Canonical page link in <head>#2032

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
iArchitSharma wants to merge1 commit intogoogle:main
base:main
Choose a base branch
Loading
fromiArchitSharma:carn

Conversation

iArchitSharma
Copy link
Contributor

This PRfixes#2010#1537

this code generates a canonical link tag for a webpage based on the value of thecanonical_url parameter in the content file's front matter. If the parameter is not defined, it falls back to the permalink of the page, ensuring that search engines understand the preferred URL for the page.

Signed-off-by: Archit Sharma <74408634+iArchitSharma@users.noreply.github.com>
@fekete-robert
Copy link
Collaborator

Hi, thanks for the PR!
I think this functionality should go directly into layouts/partials/head.html, or into a separate partial that's included in head.html.
The head-end hook is not a good place for it, because that's a placeholder file and many projects override it with their own code.

iArchitSharma reacted with thumbs up emoji

@chalinchalin marked this pull request as draftJune 4, 2024 21:25
@chalin
Copy link
Collaborator

Hi@iArchitSharma - it looks like you copied the file that I put together for the OTel.io site. Is that the case? If so, then that file is a partial experimental design (I still have work to do on it),and it isn't suitable, in it's current form, for inclusion in Docsy yet.

iArchitSharma reacted with eyes emoji

@iArchitSharma
Copy link
ContributorAuthor

@fekete-robert, thanks for the info. I'll move this functionality to head directly then.

@iArchitSharma
Copy link
ContributorAuthor

Yes,@chalin, I copied this from the OTel.io site. Although when I tested it, it seemed to work as intended. What improvements are needed here? I would love to help

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[i18n] Canonical page link of a fallback page should refer to default language page
3 participants
@iArchitSharma@fekete-robert@chalin

[8]ページ先頭

©2009-2025 Movatter.jp