diff --git a/config.toml b/config.toml index 8d9321c..a0d8811 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "https://seirdy.one/" +baseURL = "https://seirdy.one/" # just the default, I have mirrors languageCode = "en-us" title = "Seirdy's Home" @@ -13,6 +13,8 @@ disableKinds = ["taxonomy", "term"] [params] description = "Seirdy's Home: personal website and blog for Rohan Kumar, A.K.A. Seirdy" src = "https://sr.ht/~seirdy/seirdy.one/" +canonicalBaseURL = "https://seirdy.one" # I have mirrors with different baseURLs +webmentionEndpoint = "https://seirdy.one/webmentions/receive" logUrlPrefix = "https://git.sr.ht/~seirdy/seirdy.one/log/master/item/" copyright = "Copyright © 2021 Rohan Kumar" dark = "auto" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b77b2d5..02c4a94 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,15 +1,16 @@
+{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} -{{ if or (eq site.BaseURL "https://seirdy.one/") (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}} +{{ if or (eq site.BaseURL site.Params.CanonicalBaseURL) (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}} {{ end -}} - - + + {{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}} {{- printf `` $webmanifest.RelPermalink | safeHTML }} -