aboutsummaryrefslogtreecommitdiff
path: root/example/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'example/tpl')
-rw-r--r--example/tpl/render_gemtext.html5
1 files changed, 3 insertions, 2 deletions
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) }}
<!DOCTYPE html>
<html>
<head>
- <title>TODO Title</title>
+ <title>{{ $gemtextRes.Title | default "Example Gemtext File" }}</title>
<link rel="stylesheet" type="text/css" href="/bamboo.css" />
</head>
<body>
- {{ gemtext (include $filePath) }}
+ {{ $gemtextRes.Body }}
</body>
</html>