プレイグラウンド、サンドボックス、使い捨てスクリプト置き場
0

Configure Feed

Select the types of activity you want to include in your feed.

update Caddyfile

Kohei Watanabe (Oct 14, 2025, 3:50 PM +0900) d01e3104 9da28750

+10 -4
+10 -3
caddy-md/Caddyfile
··· 1 1 :8080 { 2 - file_server 3 - templates 4 - try_files {path} / 2 + file_server browse 3 + 4 + @md { 5 + file {path}.md {path}index.md 6 + } 7 + 8 + handle @md { 9 + templates 10 + rewrite /_template.html 11 + } 5 12 }
caddy-md/srv/a.md caddy-md/srv/notes/a.md
-1
caddy-md/srv/index.html caddy-md/srv/_template.html
··· 2 2 {{- $path := .OriginalReq.URL.Path}} 3 3 {{- if hasSuffix "/" $path}}{{$path = print $path "index"}}{{end}} 4 4 {{- $path = print $path ".md"}} 5 - {{- if not (fileExists $path)}}{{httpError 404}}{{end}} 6 5 {{- $markdown := (include $path | splitFrontMatter)}} 7 6 {{- $title := default (trimSuffix ".md" (base $path)) $markdown.Meta.title}} 8 7 <html lang="ja">
caddy-md/srv/index.md caddy-md/srv/notes/index.md