{{/* ASW Caddy Browse Template Go HTML template for Caddy's file_server browse directive. Usage in Caddyfile: file_server browse { browse { template_file /path/to/agentic-semantic-web/packs/caddy/browse.html } } Template variables: .Name — directory name (last segment of path) .Path — current URL path, e.g. "/files/" .Files — []FileInfo entries, each with: .Name, .URL, .Size, .ModTime, .IsDir, .IsSymlink */}} {{.Name}} — Directory listing

{{.Name}}

{{/* Breadcrumb — split path and link each segment */}} / {{- $parts := splitList "/" (trimSuffix "/" .Path) -}} {{- $acc := "" -}} {{- range $i, $part := $parts -}} {{- if $part -}} {{- $acc = printf "%s/%s" $acc $part -}} /{{$part}} {{- end -}} {{- end -}}

{{/* Parent directory link */}} {{if ne .Path "/"}} {{end}} {{/* Directory entries first */}} {{range .Files}}{{if .IsDir}} {{end}}{{end}} {{/* File entries */}} {{range .Files}}{{if not .IsDir}} {{end}}{{end}}
Name Size Modified
..
{{.Name}}/ {{.ModTime.Format "2006-01-02 15:04"}}
{{.Name}} {{humanizeBytes .Size}} {{.ModTime.Format "2006-01-02 15:04"}}