caddy-website/Caddyfile
Matthew Holt 5f4b630679
Begin transition to new docs layout
Still need to clean things up and get Quick Assist working again
2024-02-19 12:30:26 -07:00

32 lines
671 B
Caddyfile

localhost
root * src
file_server
templates {
extensions {
# Uncomment this if you have the caddy-hitcounter plugin (https://github.com/mholt/caddy-hitcounter):
# hitCounter {
# style bright_green
# pad_digits 6
# }
}
}
encode zstd gzip
try_files {path}.html {path}
redir /docs/json /docs/json/
redir /docs/modules /docs/modules/
rewrite /docs/json/* /docs/json/index.html
rewrite /docs/modules/* /docs/modules/index.html
# allow direct access to markdown but otherwise
# rewrite to docs index page to render it
@notDirectDocsMarkdown {
path /docs/*
not path *.md
}
rewrite @notDirectDocsMarkdown /docs/index.html
reverse_proxy /api/* localhost:4444