Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@ summaryLength = 30
## You can enable to add anchor links to header elements
# enable_anchor_link = true

# [params.homepage_meta_tags]
# meta_description = "Leela Chess Zero is an open source neural network based chess engine."
# meta_og_title = "Leela Chess Zero"
# meta_og_type = "website"
# meta_og_url = "https://hugo-whisper.netlify.com"
# meta_og_image = "https://raw.githubusercontent.com/JugglerX/hugo-whisper-theme/master/images/tn.png"
# meta_og_description = "Hugo Whisper is a documentation theme built with Hugo."
# meta_twitter_card = "summary"
# meta_twitter_site = "@zerostaticio"
# meta_twitter_creator = "@zerostaticio"
[params.homepage_meta_tags]
meta_description = "Leela Chess Zero is an open source neural network based chess engine."
meta_og_title = "Leela Chess Zero"
meta_og_type = "website"
meta_og_url = "https://lczero.org"
# meta_og_image = "https://raw.githubusercontent.com/JugglerX/hugo-whisper-theme/master/images/tn.png"
meta_og_description = "Leela Chess Zero is an open source neural network based chess engine."
meta_twitter_card = "summary"
meta_twitter_site = "@leelachesszero"

[params.logo]
mobile = "/images/logo.svg"
Expand Down
3 changes: 2 additions & 1 deletion content/blog/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Blog"
title: "Leela Chess Zero Blog"
date: 2019-12-07T19:59:42+01:00
description: "Updates from the Lc0 team."
draft: false
weight: 100
---
Expand Down
1 change: 1 addition & 0 deletions themes/leela/layouts/_partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partial "head/opengraph.html" . }}
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
{{ if .Param "math" }}
Expand Down
81 changes: 81 additions & 0 deletions themes/leela/layouts/_partials/head/opengraph.html
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 }}">
Copy link

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OG image meta tag is missing; add <meta property="og:image" content="{{ .Site.Params.homepage_meta_tags.meta_og_image }}"> after this line so social previews include the configured image.

Suggested change
<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 }}">

Copilot uses AI. Check for mistakes.

{{- with or site.Title .Site.Params.homepage_meta_tags.meta_og_title | plainify }}
<meta property="og:site_name" content="{{ . }}">
{{- end }}

{{- with or .Title site.Title .Site.Params.homepage_meta_tags.meta_og_title | plainify }}
<meta property="og:title" content="{{ . }}">
{{- end }}

{{- with or .Description .Summary .Site.Params.homepage_meta_tags.meta_description | plainify | htmlUnescape }}
<meta property="og:description" content="{{ trim . "\n\r\t " }}">
{{- end }}

{{- with or .Params.locale site.Language.LanguageCode }}
<meta property="og:locale" content="{{ replace . `-` `_` }}">
{{- end }}

{{- with or .Title site.Title .Site.Params.homepage_meta_tags.meta_og_title | plainify }}
<meta name="twitter:title" content="{{ . }}">
{{- end }}

{{- with or .Description .Summary .Site.Params.homepage_meta_tags.Params.meta_description | plainify | htmlUnescape }}
<meta name="twitter:description" content="{{ trim . "\n\r\t " }}">
{{- end }}


<meta name="twitter:site" content="{{ .Site.Params.homepage_meta_tags.meta_twitter_site }}" />
<meta name="twitter:card" content="{{ .Site.Params.homepage_meta_tags.meta_twitter_card }}" />

{{- if .IsPage }}
<meta property="og:type" content="article">
{{- with .Section }}
<meta property="article:section" content="{{ . }}">
{{- end }}
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{- with .PublishDate }}
<meta property="article:published_time" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
{{- end }}
{{- with .Lastmod }}
<meta property="article:modified_time" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
{{- end }}
{{- range .GetTerms "tags" | first 6 }}
<meta property="article:tag" content="{{ .Page.Title | plainify }}">
{{- end }}
{{- else }}
<meta property="og:type" content="website">
{{- end }}

{{- with .Params.audio }}
{{- range . | first 6 }}
<meta property="og:audio" content="{{ . | absURL }}">
{{- end }}
{{- end }}

{{- with .Params.videos }}
{{- range . | first 6 }}
<meta property="og:video" content="{{ . | absURL }}">
{{- end }}
{{- end }}

{{- range .GetTerms "series" }}
{{- range .Pages | first 7 }}
{{- if ne $ . }}
<meta property="og:see_also" content="{{ .Permalink }}">
{{- end }}
{{- end }}
{{- end }}

{{- with site.Params.social }}
{{- if reflect.IsMap . }}
{{- with .facebook_app_id }}
<meta property="fb:app_id" content="{{ . }}">
{{- else }}
{{- with .facebook_admin }}
<meta property="fb:admins" content="{{ . }}">
{{- end }}
{{- end }}
{{- end }}
{{- end }}