From eb8ca07b9f0ceadd8f503f012ccb79663d06f797 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 25 Apr 2022 08:49:13 -0700 Subject: [PATCH] Goldmark 1.4.12, switch to good unminified output - Goldmark 1.4.12 switches footnotes from a
to a
; update regexes and stylesheet to account for this. - Goldmark 1.4.12 allows multiple footnotes with the same reference; use that. - Clean up templates for unminified output. Also delete an unused class. - Switch to unminified output by default. --- Makefile | 2 +- assets/css/main.css | 2 +- content/posts/website-best-practices.md | 2 +- .../_markup/render-codeblock-figure.html | 30 ++++++++--------- layouts/_default/single.html | 4 +-- layouts/partials/processed-content.html | 32 +++++++++++-------- layouts/posts/single.html | 4 +-- 7 files changed, 40 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index c9035f7..a9f5d91 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ DEVSERVER_URL="http://localhost:1313/" DOMAIN = seirdy.one HUGO_BASEURL = "https://$(DOMAIN)/" -HUGO_FLAGS = --gc --minify --ignoreCache +HUGO_FLAGS = --gc --ignoreCache USER = deploy@$(DOMAIN) WWW_ROOT = /var/www/$(DOMAIN) GEMINI_ROOT = /srv/gemini/$(DOMAIN) diff --git a/assets/css/main.css b/assets/css/main.css index 733b53b..2a6e991 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -182,7 +182,7 @@ img:not(.u-photo) { * Also use "content-visibility: auto" to improve performance by * reducing the number of DOM nodes rendered at once. */ footer, -section[role="doc-endnotes"] { +div[role="doc-endnotes"] { border-top: 1px solid; content-visibility: auto; } diff --git a/content/posts/website-best-practices.md b/content/posts/website-best-practices.md index 8e0d8c9..b3bfa3e 100644 --- a/content/posts/website-best-practices.md +++ b/content/posts/website-best-practices.md @@ -701,7 +701,7 @@ Color schemes should also look good to users who apply gamma adjustments. Most o In defense of link under­lines {#in-defense-of-link-underlines} ---------------------------------- -Some typographers insist that [underlined on-screen text is obsolete](https://practicaltypography.com/underlining.html), and hyperlinks are no exception. I disagree. +Some typographers insist that [underlined on-screen text is obsolete](https://practicaltypography.com/underlining.html)[^12], and that hyperlinks are no exception. I disagree. One reason is that underlines make it easy to separate multiple consecutive inline links: diff --git a/layouts/_default/_markup/render-codeblock-figure.html b/layouts/_default/_markup/render-codeblock-figure.html index 63d8ef5..9d48458 100644 --- a/layouts/_default/_markup/render-codeblock-figure.html +++ b/layouts/_default/_markup/render-codeblock-figure.html @@ -1,18 +1,18 @@ -{{ $contents := .Inner | htmlEscape }} -{{ $samp := false }} -{{ with .Attributes }} - {{ range $k, $v := . }} - {{ if strings.HasPrefix $k "var" }} - {{ $after := printf `%s` $v }} - {{ $contents = $contents | replaceRE $v $after }} - {{ else if strings.HasPrefix $k "str" }} - {{ $after := printf `%s` $v }} - {{ $contents = $contents | replaceRE $v $after }} - {{ else if and (eq $k "samp")}} - {{ $samp = $v }} - {{ end }} - {{ end }} -{{ end }} +{{ $contents := .Inner | htmlEscape -}} +{{- $samp := false -}} +{{- with .Attributes -}} + {{- range $k, $v := . -}} + {{- if strings.HasPrefix $k "var" -}} + {{- $after := printf `%s` $v -}} + {{- $contents = $contents | replaceRE $v $after -}} + {{- else if strings.HasPrefix $k "str" -}} + {{- $after := printf `%s` $v -}} + {{- $contents = $contents | replaceRE $v $after -}} + {{- else if and (eq $k "samp")}} + {{- $samp = $v -}} + {{- end -}} + {{- end -}} +{{- end -}}
 {{- if $samp -}}
 
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 2f7d304..90a27c1 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,7 @@
 {{ define "main" }}
 
-
+

{{ .Title }}