gists: serve rendered markdown from Caddy
Assisted-by: Claude Opus 5 via Claude Code
diff --git a/dns.tf b/dns.tf
index e25efa8..4d930f8 100644
--- a/dns.tf
+++ b/dns.tf
@@ -32,6 +32,7 @@ resource "dnsimple_zone_record" "chislan_family_subdomains" {
resource "dnsimple_zone_record" "kejadlen_dev_subdomains" {
for_each = {
auth = local.lotus_land_story.ip_address
+ gists = local.lotus_land_story.ip_address
git = local.lotus_land_story.ip_address
grafana = local.lotus_land_story.ip_address
hey = local.lotus_land_story.ip_address
diff --git a/lotus-land-story/caddy.yml b/lotus-land-story/caddy.yml
index 085cec7..2ec14f3 100644
--- a/lotus-land-story/caddy.yml
+++ b/lotus-land-story/caddy.yml
@@ -13,6 +13,7 @@
loop:
- caddy
- caddy/data
+ - caddy/data/gists
- name: Get docker network for trusted proxies
community.docker.docker_network:
diff --git a/lotus-land-story/templates/Caddyfile b/lotus-land-story/templates/Caddyfile
index d8e7896..8d6001c 100644
--- a/lotus-land-story/templates/Caddyfile
+++ b/lotus-land-story/templates/Caddyfile
@@ -176,6 +176,27 @@ pihole {
### External
+# synced from quire/gists
+gists.kejadlen.dev {
+ log
+
+ root * /data/gists
+ encode zstd gzip
+
+ # raw markdown, like GitHub's raw view
+ @raw path *.md
+ handle @raw {
+ file_server
+ }
+
+ # rendered views; templates stays scoped here so raw .md is never evaluated
+ handle {
+ rewrite * /_render.html
+ templates
+ file_server
+ }
+}
+
birdnetpi.chislan.family
log