-
Notifications
You must be signed in to change notification settings - Fork 401
Add opengraph metadata to theme #137
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
Changes from 2 commits
8b9f71d
2d07a3d
8069a1d
937213d
555e6f4
0955847
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| title: "Blog" | ||
| title: "Leela Chess Zero Blog" | ||
| date: 2019-12-07T19:59:42+01:00 | ||
| draft: false | ||
| weight: 100 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,81 @@ | ||||||||||||||||||||||||||
| {{/* Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/opengraph.html */}} | ||||||||||||||||||||||||||
| <meta property="og:url" content="{{ .Site.Params.homepage_meta_tags.meta_og_url }}"> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| <meta property="og:url" content="{{ .Site.Params.homepage_meta_tags.meta_og_url }}"> | |
| <meta property="og:url" content="{{ .Site.Params.homepage_meta_tags.meta_og_url }}"> | |
| <meta property="og:image" content="{{ .Site.Params.homepage_meta_tags.meta_og_image }}"> |
Outdated
Copilot
AI
Jun 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template uses site.Title and site.Params.title without the leading dot, so Hugo won’t resolve these. Update to .Site.Title and .Site.Params.title to correctly reference site parameters.
| {{- with or site.Title site.Params.title | plainify }} | |
| <meta property="og:site_name" content="{{ . }}"> | |
| {{- end }} | |
| {{- with or .Title site.Title site.Params.title | plainify }} | |
| {{- with or .Site.Title .Site.Params.title | plainify }} | |
| <meta property="og:site_name" content="{{ . }}"> | |
| {{- end }} | |
| {{- with or .Title .Site.Title .Site.Params.title | plainify }} |
Outdated
Copilot
AI
Jun 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace site.Title with .Site.Title here to ensure the site title is properly referenced in the OG title and avoid template errors.
| {{- with or .Title site.Title site.Params.title | plainify }} | |
| {{- with or .Title .Site.Title site.Params.title | plainify }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what
meta_og_imageis, but likely we don't what this particular image?