Import from agentic-semantic-web/ into restructured repo: - 7 packs (apache, caddy, flask, hugo, nginx, pandoc, python) - shared error pages (403-503) - 17 lab experiments (boilerplate, charts, misc) - 31 example pages (charts, components, content, layout, vault) - 2 themes (garden, trentuna stub) - 4 docs (llms.txt, vocabulary, philosophy, agent-directive) - lineage.md (Pico/Open Props/Charts.css history) - Hugo mounts for lab/ and examples/ All agentic.css references updated to asw.css. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
51 lines
1.7 KiB
Text
51 lines
1.7 KiB
Text
# ASW Caddy Directory Listing — Caddyfile snippet
|
|
#
|
|
# Caddy's `file_server browse` outputs its own HTML, but accepts a custom
|
|
# template file via `browse { template_file }`. The template is a Go HTML
|
|
# template with access to directory metadata and file entries.
|
|
#
|
|
# See: browse.html in this directory for the ASW-styled template.
|
|
|
|
# ── Option A: Custom template (recommended, Caddy v2.6+) ─────────────────────
|
|
#
|
|
# Full control over the listing HTML. Browse template receives:
|
|
# .Name — directory name (last path segment)
|
|
# .Path — current URL path (e.g. "/files/")
|
|
# .Files — []FileInfo, each with:
|
|
# .Name, .Size, .URL, .ModTime, .IsDir, .IsSymlink
|
|
|
|
handle /files/* {
|
|
root * /var/www/files
|
|
file_server browse {
|
|
index off
|
|
browse {
|
|
template_file /home/exedev/projects/agentic-semantic-web/packs/caddy/browse.html
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
# ── Option B: Default Caddy browse (quick, no custom template) ────────────────
|
|
#
|
|
# Uses Caddy's built-in file browser. Functional but unstyled.
|
|
# Upgrade to Option A when you want ASW aesthetics.
|
|
#
|
|
# handle /files/* {
|
|
# root * /var/www/files
|
|
# file_server browse
|
|
# }
|
|
|
|
|
|
# ── Example: expose the ASW repo itself for browsing ─────────────────────────
|
|
#
|
|
# example.com {
|
|
# handle /asw/browse/* {
|
|
# uri strip_prefix /asw/browse
|
|
# root * /home/exedev/projects/agentic-semantic-web
|
|
# file_server browse {
|
|
# browse {
|
|
# template_file /home/exedev/projects/agentic-semantic-web/packs/caddy/browse.html
|
|
# }
|
|
# }
|
|
# }
|
|
# }
|