asw-v01: archive deferred content (packs, site, lab, legacy examples)
- 2.1: packs/ -> archive/packs/ - 2.2: site/ -> archive/site/ - 2.3: src/lab/ -> archive/lab/ - 2.4: examples/ -> archive/examples-legacy/ (SSI-based)
This commit is contained in:
parent
416fe2f180
commit
e47a9f4401
173 changed files with 11 additions and 5 deletions
51
archive/packs/caddy/caddy-browse.conf
Normal file
51
archive/packs/caddy/caddy-browse.conf
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# 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
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
Loading…
Add table
Add a link
Reference in a new issue