From bbdad950670b7d8bd44b675c6d8fd215ae0ab56e Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 23 Oct 2022 14:54:36 -0700 Subject: [PATCH] Shortcode fixes - Support an indieweb person without a hyperlink. - Don't put a period after "Changelog" links. Causes a line-break on many popular phone screen sizes. --- layouts/partials/post-meta.html | 2 +- layouts/shortcodes/indieweb-person.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 8ee773f..8b289c3 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -24,7 +24,7 @@ {{ if $needsList }}{{ end }} {{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}} {{ if $needsList }}
  • {{ end }} - Last updated .{{ if not $shortMeta }} Changelog.{{ end }} + Last updated .{{ if not $shortMeta }} Changelog{{ end }} {{ if $needsList }}
  • {{ end }} {{- end -}} {{- if not $isNotes -}} diff --git a/layouts/shortcodes/indieweb-person.html b/layouts/shortcodes/indieweb-person.html index a2056da..bf9aa6f 100644 --- a/layouts/shortcodes/indieweb-person.html +++ b/layouts/shortcodes/indieweb-person.html @@ -1,7 +1,9 @@ + {{- if .Get "url" -}} {{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}} + {{- if .Get "url" -}}{{- end -}}{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}} {{- if (.Get "org") }} from