Just need a better explanation of how to use template_file
with file_server
and browse
my stanza is
https://example.x.net {
import r53
file_server {
root "/data/eval/filerun/user-files/"
hide .*
browse
}
}
that works fine. now I want to use my own template to brand the page a bit so I copied and modfied the html template from the link in the docs https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/fileserver/browsetpl.go. Then I tried adding what I thought was a directive template_file
but caddy says it’s not. So obvioiusly I don’t understand what the carrots around <template_file>
in the docs are trying to tell me about how to use it.
this throws an error
run: adapting config using caddyfile: parsing caddyfile tokens for 'file_server': /opt/caddy/conf/giskard/caddy.conf:47 - Error during parsing: unknown subdirective 'template_file'
https://example.x.net {
import r53
file_server {
root "/data/eval/filerun/user-files/"
hide .*
browse
template_file /opt/caddy/templates/browser.html
}
}
1. Caddy version (caddy version
):
v2.4.5 h1:P1mRs6V2cMcagSPn+NWpD+OEYUYLIf6ecOa48cFGeUg=
compiled with xcaddy with route53 plugin