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

Configure Feed

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

create caddy-md

Kohei Watanabe (Dec 28, 2023, 11:11 PM +0900) c8b2ae0f e353a7db

+38
+5
caddy-md/Caddyfile
··· 1 + :8080 { 2 + file_server 3 + templates 4 + try_files {path} / 5 + }
+8
caddy-md/compose.yml
··· 1 + services: 2 + caddy: 3 + image: caddy 4 + ports: 5 + - 8080:8080 6 + volumes: 7 + - ./Caddyfile:/etc/caddy/Caddyfile 8 + - ./srv:/srv
+1
caddy-md/srv/a.md
··· 1 + # あ
+15
caddy-md/srv/index.html
··· 1 + <!DOCTYPE html> 2 + {{- $path := .OriginalReq.URL.Path}} 3 + {{- if hasSuffix "/" $path}}{{$path = print $path "index"}}{{end}} 4 + {{- $path = print $path ".md"}} 5 + {{- if not (fileExists $path)}}{{httpError 404}}{{end}} 6 + {{- $markdown := (include $path | splitFrontMatter)}} 7 + {{- $title := default (trimSuffix ".md" (base $path)) $markdown.Meta.title}} 8 + <html lang="ja"> 9 + <meta charset="UTF-8"> 10 + <meta name="viewport" content="width=device-width"> 11 + <title>{{$title}}</title> 12 + 13 + {{markdown $markdown.Body | trim}} 14 + 15 + </html>
+9
caddy-md/srv/index.md
··· 1 + --- 2 + title: トップ 3 + --- 4 + 5 + # トップページ 6 + 7 + こんにちは、世界 8 + 9 + - [a](a)