summaryrefslogtreecommitdiff
path: root/layouts/_partials/head/meta.html
diff options
context:
space:
mode:
authorArne Rief <riearn@proton.me>2026-01-09 12:24:05 +0100
committerArne Rief <riearn@proton.me>2026-01-09 12:24:05 +0100
commitf8541ef965ca22e746b523eb418e47cb4f78f2d8 (patch)
tree49e1540ed42595a44196817eadf97337587a2aea /layouts/_partials/head/meta.html
parent038054b8206a9c25e84adeb0f0f355abd22d6143 (diff)
Upgrade to new template system from Hugo v0.146.0
Diffstat (limited to 'layouts/_partials/head/meta.html')
-rw-r--r--layouts/_partials/head/meta.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/layouts/_partials/head/meta.html b/layouts/_partials/head/meta.html
new file mode 100644
index 0000000..f739838
--- /dev/null
+++ b/layouts/_partials/head/meta.html
@@ -0,0 +1,27 @@
+{{- /* Basic Meta */ -}}
+<meta name="author" content="{{ site.Params.author.name | default site.Title }}">
+<meta name="robots" content="index, follow">
+
+{{- /* Open Graph */ -}}
+<meta property="og:title" content="{{ .Title | default site.Title }}">
+<meta property="og:description" content="{{ .Description | default .Summary }}">
+<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}">
+<meta property="og:url" content="{{ .Permalink }}">
+<meta property="og:site_name" content="{{ site.Title }}">
+{{- with site.Params.logo }}
+ <meta property="og:image" content="{{ . | absURL }}">
+{{- end }}
+{{- if .IsPage }}
+ <meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
+ {{- with .Lastmod }}
+ <meta property="article:modified_time" content="{{ .Format "2006-01-02T15:04:05Z07:00" }}">
+ {{- end }}
+{{- end }}
+
+{{- /* Twitter Card */ -}}
+<meta name="twitter:card" content="summary_large_image">
+<meta name="twitter:title" content="{{ .Title | default site.Title }}">
+<meta name="twitter:description" content="{{ .Description | default .Summary }}">
+{{- with site.Params.logo }}
+ <meta name="twitter:image" content="{{ . | absURL }}">
+{{- end }}