diff --git a/content/support/index.md b/content/support/index.md index 8555352..898db73 100644 --- a/content/support/index.md +++ b/content/support/index.md @@ -12,7 +12,7 @@ Fediverse moderation : I moderate the pleroma.envs.net Akkoma server as [@Seirdy@pleroma.envs.net](https://pleroma.envs.net/Seirdy "{rel='me'}"), and [I curate some blocklists]({{}}). This includes FediNuke; including supersets that include it, this is likely the most popular blocklist across the Fediverse. Blogging -: See [the "Articles" section]({{}}) for long-form articles, or [the "Notes" section]({{}}) for short-form microblogs. +: See [the "Articles" section]({{}}) for long-form articles, or [the "Notes" section]({{}}) for short-form microblogs. Coding : Not much of that in public right now, but more are on the way (including the programs that generate my blocklists). diff --git a/layouts/partials/indieweb-author.html b/layouts/partials/indieweb-author.html deleted file mode 120000 index b620fb8..0000000 --- a/layouts/partials/indieweb-author.html +++ /dev/null @@ -1 +0,0 @@ -../shortcodes/indieweb-author.html \ No newline at end of file diff --git a/layouts/partials/indieweb-author.html b/layouts/partials/indieweb-author.html new file mode 100644 index 0000000..e7a54ee --- /dev/null +++ b/layouts/partials/indieweb-author.html @@ -0,0 +1,26 @@ + + +{{- /* no line break */ -}} diff --git a/layouts/partials/indieweb-icon.html b/layouts/partials/indieweb-icon.html deleted file mode 120000 index 3dbe2fd..0000000 --- a/layouts/partials/indieweb-icon.html +++ /dev/null @@ -1 +0,0 @@ -../shortcodes/indieweb-icon.html \ No newline at end of file diff --git a/layouts/partials/indieweb-icon.html b/layouts/partials/indieweb-icon.html new file mode 100644 index 0000000..72ebf74 --- /dev/null +++ b/layouts/partials/indieweb-icon.html @@ -0,0 +1,10 @@ +{{- $src := "" -}} +{{- if in site.BaseURL ".onion" -}} +{{- $favicon := resources.Get "/favicon.png" -}} +{{- $favicon_base64 := $favicon.Content | base64Encode -}} +{{- $src = printf "data:image/png;base64,%s" $favicon_base64 -}} +{{- else -}} +{{- with (partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg") -}} +{{- $src = .Permalink -}} +{{- end -}}{{- end -}} + diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 303f120..d6448d1 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,8 +1,5 @@ {{- define "main" -}} {{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} -{{- .Scratch.Set "codeIndex" 1 -}} -{{- .Scratch.Set "codeIndexAtom" 1 -}} -{{- .Scratch.Set "codeIndexRss" 1 -}}
diff --git a/layouts/shortcodes/codecaption.atom b/layouts/shortcodes/codecaption.atom index 5dac3c7..8d9f3e3 100644 --- a/layouts/shortcodes/codecaption.atom +++ b/layouts/shortcodes/codecaption.atom @@ -1,4 +1,5 @@ -{{- $codeIndex := (.Page.Scratch.Get "codeIndexAtom") -}} +{{- .Page.Scratch.Add "codeIndexAtom" 1 -}} +{{- $codeIndex := (int (.Page.Scratch.Get "codeIndexAtom")) -}} {{- $id := (printf `code-%d` $codeIndex) -}} {{- with .Get "id" -}} {{- $id = . -}} @@ -14,4 +15,3 @@ : {{ .Inner | .Page.RenderString | safeHTML }} -{{- .Page.Scratch.Set "codeIndexAtom" (add 1 $codeIndex) -}} diff --git a/layouts/shortcodes/codecaption.html b/layouts/shortcodes/codecaption.html index 8249d2a..4f2c0e5 100644 --- a/layouts/shortcodes/codecaption.html +++ b/layouts/shortcodes/codecaption.html @@ -1,4 +1,5 @@ -{{- $codeIndex := (.Page.Scratch.Get "codeIndex") -}} +{{- .Page.Scratch.Add "codeIndex" 1 -}} +{{- $codeIndex := (int (.Page.Scratch.Get "codeIndex")) -}} {{- $id := (printf `code-%d` $codeIndex) -}} {{- with .Get "id" -}} {{- $id = . -}} @@ -14,4 +15,3 @@ : {{ .Inner | .Page.RenderString | safeHTML }} -{{- .Page.Scratch.Set "codeIndex" (add 1 $codeIndex) -}} diff --git a/layouts/shortcodes/codecaption.rss b/layouts/shortcodes/codecaption.rss index ad31422..d9e1d43 100644 --- a/layouts/shortcodes/codecaption.rss +++ b/layouts/shortcodes/codecaption.rss @@ -1,4 +1,5 @@ -{{- $codeIndex := (.Page.Scratch.Get "codeIndexRss") -}} +{{- .Page.Scratch.Add "codeIndexRss" 1 -}} +{{- $codeIndex := (int (.Page.Scratch.Get "codeIndexRss")) -}} {{- $id := (printf `code-%d` $codeIndex) -}} {{- with .Get "id" -}} {{- $id = . -}} @@ -14,4 +15,3 @@ : {{ .Inner | .Page.RenderString | safeHTML }} -{{- .Page.Scratch.Set "codeIndexRss" (add 1 $codeIndex) -}} diff --git a/layouts/shortcodes/indieweb-author.html b/layouts/shortcodes/indieweb-author.html deleted file mode 100644 index e7a54ee..0000000 --- a/layouts/shortcodes/indieweb-author.html +++ /dev/null @@ -1,26 +0,0 @@ - - -{{- /* no line break */ -}}