From 0134492489ac70306486678aae81192d9cc0228d Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Thu, 4 Jul 2024 17:36:48 +0200 Subject: Split gemtext function output into Body and Title --- example/tpl/render_gemtext.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'example/tpl/render_gemtext.html') diff --git a/example/tpl/render_gemtext.html b/example/tpl/render_gemtext.html index 34a8c7c..72e35a4 100644 --- a/example/tpl/render_gemtext.html +++ b/example/tpl/render_gemtext.html @@ -2,13 +2,14 @@ {{ $base := last $pathSplit | default "index.gmi" }} {{ $filePath := append (initial $pathSplit) $base | join "/" | printf "static%s" }} {{ if not (fileExists $filePath) }}{{ httpError 404 }}{{ end }} +{{ $gemtextRes := gemtext (include $filePath) }} - TODO Title + {{ $gemtextRes.Title | default "Example Gemtext File" }} - {{ gemtext (include $filePath) }} + {{ $gemtextRes.Body }} -- cgit v1.2.3