From 40d957cfbe3c4791145a35cba1004a6ea30b45ac9e0dbc4eee3577c2d981ee04 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson <> Date: Fri, 18 Sep 2026 00:00:00 +0000 Subject: Ignore blank lines between front matter and entry body .RawContent keeps the newline that follows the closing front matter delimiter, and only trailing whitespace was being chomped. An entry written with a blank line there, which is what the entry archetype produces, got one more blank line under its pageinfo line in the gemtext than an entry written without one. The same leading newline also hid a heading on the first line from the check that decides whether to add a separating newline, since that pattern is anchored to the start of the content. Co-Authored-By: Claude Opus 5 --- layouts/single.gmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/single.gmi b/layouts/single.gmi index 2cee33d..065e057 100644 --- a/layouts/single.gmi +++ b/layouts/single.gmi @@ -12,7 +12,7 @@ => {{ .RelPermalink }} {{ emojify ":link:" }} {{ i18n "downloadAudio" $.Title }} {{- end }}{{ end }} -{{ $content := chomp (.RawContent) -}} +{{ $content := strings.Trim .RawContent "\r\n" -}} {{ $scratch := newScratch -}} {{/* if pageinfo exists or content begins with a heading, add an extra newline */ -}} -- cgit v1.2.3