aboutsummaryrefslogtreecommitdiff
path: root/example/tpl/render_gemtext.html
diff options
context:
space:
mode:
Diffstat (limited to 'example/tpl/render_gemtext.html')
-rw-r--r--example/tpl/render_gemtext.html9
1 files changed, 2 insertions, 7 deletions
diff --git a/example/tpl/render_gemtext.html b/example/tpl/render_gemtext.html
index 72e35a4..82d3c02 100644
--- a/example/tpl/render_gemtext.html
+++ b/example/tpl/render_gemtext.html
@@ -1,15 +1,10 @@
-{{ $pathSplit := splitList "/" .Req.URL.Path }}
-{{ $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>{{ $gemtextRes.Title | default "Example Gemtext File" }}</title>
+ <title>{{ .Title | default "Example Gemtext File" }}</title>
<link rel="stylesheet" type="text/css" href="/bamboo.css" />
</head>
<body>
- {{ $gemtextRes.Body }}
+ {{ .Body }}
</body>
</html>