{{$pathParts := splitList "/" .OriginalReq.URL.Path}} {{$markdownFilename := default "index" (slice $pathParts 2 | join "/")}} {{$markdownFilePath := printf "/docs/markdown/%s.md" $markdownFilename}} {{if not (fileExists $markdownFilePath)}}{{httpError 404}}{{end}} {{$markdownFile := (include $markdownFilePath | splitFrontMatter)}} {{$title := default $markdownFilename $markdownFile.Meta.title}} {{$title}} — Caddy Documentation {{import "/includes/docs/head.html"}} {{template "docs-head"}} {{include "/includes/docs/header.html"}}
{{include "/includes/docs/nav.html"}}
{{markdown $markdownFile.Body}}
{{include "/includes/footer.html"}}