From e100ccf034727e94f2025416eeb0524ba0b16223 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 7 Feb 2022 12:04:51 +0100 Subject: [PATCH] feat: add canonical link to head (#331) --- layouts/partials/head/others.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head/others.html b/layouts/partials/head/others.html index 0365c0b..a9c9f34 100644 --- a/layouts/partials/head/others.html +++ b/layouts/partials/head/others.html @@ -59,8 +59,12 @@ media="all" /> -{{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} +{{- with .OutputFormats.Get "html" }} + {{ printf `` .Permalink .Rel .MediaType.Type | safeHTML }} +{{- end }} + +{{- if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} -{{ end }} +{{- end }} {{ printf "" "Made with Geekdoc theme https://github.com/thegeeklab/hugo-geekdoc" | safeHTML }}