{{ $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) }} {{ $gemtextRes.Title | default "Example Gemtext File" }} {{ $gemtextRes.Body }}