From 672d89d0078f79a987e0e5bb735c815febb37c6c Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 1 Jun 2022 21:49:04 -0700 Subject: [PATCH] More whitespace fixes --- layouts/partials/full-article.html | 6 +++--- layouts/partials/post-meta.html | 2 +- layouts/partials/wordcount.html | 8 ++++---- scripts/xhtmlize.sh | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/layouts/partials/full-article.html b/layouts/partials/full-article.html index f950aef..172c8c6 100644 --- a/layouts/partials/full-article.html +++ b/layouts/partials/full-article.html @@ -1,9 +1,9 @@

{{ .Title }}

- {{ if not .Params.disableMeta -}} - {{- partial "post-meta.html" . }} - {{- end }} + {{- if not .Params.disableMeta -}} + {{- partial "post-meta.html" . -}} + {{- end -}}
diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index adda0c7..314a672 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -16,4 +16,4 @@ {{- if not $isNotes -}}
{{ partial "wordcount.html" . -}} - {{ end }} + {{- end -}} diff --git a/layouts/partials/wordcount.html b/layouts/partials/wordcount.html index c938c26..4504530 100644 --- a/layouts/partials/wordcount.html +++ b/layouts/partials/wordcount.html @@ -3,9 +3,9 @@ {{- $thousands := string (div .WordCount 1000) -}} {{- $displayCount = printf "%s thousand" $thousands -}} About -{{- end }} +{{- end -}} - {{ $displayCount }} + {{- $displayCount -}} words {{- with .ReadingTime -}} {{- $displayTime := string . -}} @@ -14,6 +14,6 @@ About {{- $minutes := mod . 60 -}} {{- $displayTime = (printf "%d hour and %d" $hours $minutes) | safeHTML -}} {{- end -}} - ; a{{ if lt . 10 }} short{{ else if and (gt . 20) (lt . 30) }} somewhat long{{ else if and (gt . 29) (lt . 60) }} long{{ else if gt . 59 }} very long{{ end }} + ; a{{ if lt . 10 }} short{{ else if and (gt . 20) (lt . 30) }} somewhat long{{ else if and (gt . 29) (lt . 60) }} long{{ else if gt . 59 }} very long {{ end -}} read -{{- end }} +{{- end -}} diff --git a/scripts/xhtmlize.sh b/scripts/xhtmlize.sh index 10b4b6b..920e05b 100644 --- a/scripts/xhtmlize.sh +++ b/scripts/xhtmlize.sh @@ -5,7 +5,6 @@ # XML tooling. # this means that every index.html file has an equivalent index.xhtml file. # content negotiation allows an agent to pick html or xhtml. -# echo "" find "$1" -type f -name '*.html' \ -exec sh -c 'echo "" >"${0%*.html}.xhtml" && xmlfmt -i " " -f "$0" | busybox sed -e :a -e "/./,\$!d;/^\n*\$/{\$d;N;};/\n\$/ba" | sd -f m "\n(?:\t*)?\n\t*>\"${0%*.html}.xhtml\"" "sponge \"$0\""' {} \;