From dcbace64a3407604404ce2fbd9c0165e1cfbbac0 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Tue, 15 Mar 2022 13:47:42 -0700 Subject: [PATCH] Fix: properly use "site" function instead of var This fixes the logic to use PNGs instead of SVGs for the hidden service. --- layouts/partials/head.html | 13 +++++++------ layouts/shortcodes/indieweb-icon.html | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0e1d37f..b3628b4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -3,15 +3,16 @@ -{{- if or (eq .Site.BaseURL "https://seirdy.one/") (eq .Site.BaseURL "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/") -}} +{{ if or (eq site.BaseURL "https://seirdy.one/") (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") }} -{{- end }} +{{ end }} {{ .Title }}{{ if and (lt (len .Title) 66) (ne .RelPermalink "/") }} - Seirdy{{ end }} -{{ if (eq .RelPermalink "/") -}} +{{ if (eq .RelPermalink "/") }} + -{{- end -}} +{{ end -}} {{ if gt .Date 0 -}} @@ -21,7 +22,7 @@ {{- end -}} -{{ if (ne .Site.BaseURL "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/") -}} +{{ if not (in site.BaseURL ".onion") -}} {{ $icon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" }} {{- printf `` $icon_svg.RelPermalink | safeHTML }} {{- end }} @@ -38,7 +39,7 @@ {{- $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}} {{- printf `` $webmanifest.RelPermalink | safeHTML }} - + {{- $resources := slice -}} {{- $resources = $resources | append (resources.Get "/css/main.css") -}} diff --git a/layouts/shortcodes/indieweb-icon.html b/layouts/shortcodes/indieweb-icon.html index 9d2c9be..f97926b 100644 --- a/layouts/shortcodes/indieweb-icon.html +++ b/layouts/shortcodes/indieweb-icon.html @@ -3,7 +3,7 @@ {{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}} {{- $favicon_bigpng := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}