From b6cec919ab15ac4151cd9c4ffe05e7cc2eb21813 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Tue, 24 May 2022 17:28:32 -0700 Subject: [PATCH] Fix changelogs for notes --- layouts/partials/post-meta.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 79b1eae..51e8263 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -1,12 +1,16 @@ -{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} -{{- $logURL := printf "%scontent/%s" .Site.Params.logUrlPrefix .File.Path }} +{{ $isNote := (eq .Page.Section "notes") -}} +{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}} +{{- $logURL := printf "%scontent/%s" .Site.Params.logUrlPrefix .File.Path -}} +{{- if not $isNote -}} + {{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}} +{{- end -}} Posted {{ .Date.Format "2006-01-02" }} by {{- partial "indieweb-author.html" -}} on his Website{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and Gemini capsule{{- end -}}. {{ if lt .Date .Lastmod -}}
- Last updated . Changelog. + Last updated . Changelog. {{- end }} - {{ if not (eq .Page.Section "notes") -}} + {{ if not $isNote -}}
{{ partial "wordcount.html" . -}} {{ end }}