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

chore: add canonical URL to head template #261

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

davlgd
Copy link
Contributor

@davlgd davlgd commented Jan 19, 2024

Fix #260

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 3e64418
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/65aa2e8aaec1060008d0a178
😎 Deploy Preview https://deploy-preview-261--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@imfing imfing changed the title Add canonical URL to head template chore: add canonical URL to head template Jan 19, 2024
@imfing imfing merged commit 728fe21 into imfing:main Jan 19, 2024
4 checks passed
@imfing
Copy link
Owner

imfing commented Jan 19, 2024

@davlgd thank you

@mafendi
Copy link
Contributor

mafendi commented Jan 22, 2024

I am sorry, but it is a good idea to provide the possibility to specify the canonical URL if any. This is useful to content writers referring to another resource as original.

On our website https://leipapa.com we use the following structure:

Added canonical to front matter and ...

{{ with .Params.canonical }}
  <link rel="canonical" href="{{ . }}" itemprop="url" />
{{ else }}
  <link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
{{ end }}

@davlgd davlgd deleted the patch-1 branch January 22, 2024 10:51
@imfing
Copy link
Owner

imfing commented Jan 22, 2024

I am sorry, but it is a good idea to provide the possibility to specify the canonical URL if any. This is useful to content writers referring to another resource as original.

On our website https://leipapa.com we use the following structure:

Added canonical to front matter and ...


{{ with .Params.canonical }}

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

{{ else }}

  <link rel="canonical" href="{{ .Permalink }}" itemprop="url" />

{{ end }}

@mafendi hey, can you create a PR for this?

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.

Add canonical URL to header
3 participants