pidgin/nest

Move most of custom header to meta partial

17 months ago, Elliott Sales de Andrade
bb1e9645cf74
Parents bd9962a8147b
Children bf1fdaabeb6b
Move most of custom header to meta partial

This puts the version comment stuff earlier in the file, so it's more
noticeable, and keeps the OpenGraph/Twitter card info near the other `meta`
tags.

Unfortunately, this does mean we need to copy in the original `meta` partial,
but it's only two lines.

Testing Done:
Checked rendered results and the meta tags were still there.

Reviewed at https://reviews.imfreedom.org/r/1929/
--- a/hugo/layouts/partials/custom-header.html Tue Oct 11 07:17:13 2022 -0500
+++ b/hugo/layouts/partials/custom-header.html Tue Oct 11 07:17:50 2022 -0500
@@ -1,13 +1,1 @@
<link rel="stylesheet" href="/css/custom.css">
-
-{{ printf "<!--" | safeHTML }}
- Hugo: {{ now.Format "2006-01-02T15:04:05 -0700" }}
- - Job:
- {{ with getenv "BUILD_NAME" }}{{ . | safeHTML }}{{ else }}n/a{{ end }}
- {{ with getenv "BUILD_DATE" }}{{ . | time.Format "2006-01-02T15:04:05 -0700" }}{{ else }}n/a{{ end }}
- - Commit: {{ with getenv "COMMIT" }}{{ . | safeHTML }}{{ else }}n/a{{ end }}
- - {{ hugo.Environment | safeHTML }}
-{{ printf "//-->" | safeHTML }}
-
-{{ template "_internal/opengraph.html" . }}
-{{ template "_internal/twitter_cards.html" . }}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/meta.html Tue Oct 11 07:17:50 2022 -0500
@@ -0,0 +1,14 @@
+{{ printf "<!--" | safeHTML }}
+ Hugo: {{ now.Format "2006-01-02T15:04:05 -0700" }}
+ - Job:
+ {{ with getenv "BUILD_NAME" }}{{ . | safeHTML }}{{ else }}n/a{{ end }}
+ {{ with getenv "BUILD_DATE" }}{{ . | time.Format "2006-01-02T15:04:05 -0700" }}{{ else }}n/a{{ end }}
+ - Commit: {{ with getenv "COMMIT" }}{{ . | safeHTML }}{{ else }}n/a{{ end }}
+ - {{ hugo.Environment | safeHTML }}
+{{ printf "//-->" | safeHTML }}
+
+<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
+{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
+
+{{ template "_internal/opengraph.html" . }}
+{{ template "_internal/twitter_cards.html" . }}