From 9b53f01466043fee8c449f0dec3b4dcfdf2a7db3 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Mon, 29 Apr 2024 09:13:59 +0100 Subject: [PATCH] Bump hugo version Had to bring the opengraph template into the repo, as I use the `audio` param differently to what has become the default. Removed some unused shortcodes. --- .github/workflows/publish.yml | 2 +- layouts/partials/head.html | 2 +- layouts/partials/opengraph.html | 72 +++++++++++++++++++++++++ layouts/partials/theme-toggle-icon.html | 5 -- layouts/shortcodes/image.html | 3 -- layouts/shortcodes/last-updated.html | 1 - 6 files changed, 74 insertions(+), 11 deletions(-) create mode 100644 layouts/partials/opengraph.html delete mode 100644 layouts/partials/theme-toggle-icon.html delete mode 100644 layouts/shortcodes/image.html delete mode 100644 layouts/shortcodes/last-updated.html diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0bb7f629..487012ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,7 +26,7 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.124.1 + HUGO_VERSION: 0.125.4 PAGEFIND_VERSION: 1.1.0 TASK_VERSION: 3.36.0 steps: diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b63ece9c..5d8da206 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -50,7 +50,7 @@ {{ template "_internal/schema.html" . }} {{ if isset .Site.Taxonomies "series" }} - {{ template "_internal/opengraph.html" . }} + {{ template "partials/opengraph.html" . }} {{ end }} {{ range .Params.categories }} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 00000000..5f822434 --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,72 @@ + + +{{- with or site.Title site.Params.title | plainify }} + +{{- end }} + +{{- with or .Title site.Title site.Params.title | plainify }} + +{{- end }} + +{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} + +{{- end }} + +{{- with or .Params.locale site.Language.LanguageCode site.Language.Lang }} + +{{- end }} + +{{- if .IsPage }} + + {{- with .Section }} + + {{- end }} + {{- $ISO8601 := "2006-01-02T15:04:05-07:00" }} + {{- with .PublishDate }} + + {{- end }} + {{- with .Lastmod }} + + {{- end }} + {{- range .GetTerms "tags" | first 6 }} + + {{- end }} +{{- else }} + +{{- end }} + +{{- with partial "_funcs/get-page-images" . }} + {{- range . | first 6 }} + + {{- end }} +{{- end }} + +{{- with .Params.audio }} + +{{- end }} + +{{- with .Params.videos }} + {{- range . | first 6 }} + + {{- end }} +{{- end }} + +{{- range .GetTerms "series" }} + {{- range .Pages | first 7 }} + {{- if ne $ . }} + + {{- end }} + {{- end }} +{{- end }} + +{{- with site.Params.social }} + {{- if reflect.IsMap . }} + {{- with .facebook_app_id }} + + {{- else }} + {{- with .facebook_admin }} + + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/partials/theme-toggle-icon.html b/layouts/partials/theme-toggle-icon.html deleted file mode 100644 index c61755bf..00000000 --- a/layouts/partials/theme-toggle-icon.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html deleted file mode 100644 index a282467f..00000000 --- a/layouts/shortcodes/image.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ if .Get "src" }} - {{ . | plainify }} -{{ end }} diff --git a/layouts/shortcodes/last-updated.html b/layouts/shortcodes/last-updated.html deleted file mode 100644 index fa055368..00000000 --- a/layouts/shortcodes/last-updated.html +++ /dev/null @@ -1 +0,0 @@ -Last updated {{ partial "year-relative-date.html" .Page.Lastmod }} \ No newline at end of file