mirror of
https://github.com/caddyserver/website.git
synced 2025-04-23 13:36:16 -04:00
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
{{$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}}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>{{$title}} — Caddy Documentation</title>
|
|
{{import "/includes/docs/head.html"}}
|
|
{{template "docs-head"}}
|
|
<meta property="og:title" content="{{$title}} - Caddy Documentation">
|
|
<meta name="twitter:title" value="{{$title}} - Caddy Documentation">
|
|
</head>
|
|
<body>
|
|
{{include "/includes/docs/header.html"}}
|
|
<main>
|
|
{{include "/includes/docs/nav.html"}}
|
|
<div class="article-container">
|
|
<div class="paper" id="paper1"></div>
|
|
<div class="paper" id="paper2"></div>
|
|
<div class="paper paper3">
|
|
<article>{{markdown $markdownFile.Body}}</article>
|
|
</div>
|
|
</div>
|
|
<div class="sidebar"></div>
|
|
</main>
|
|
{{include "/includes/footer.html"}}
|
|
</body>
|
|
</html>
|