I want to serve a single markdown file with Caddy v2, rendered as html. The old Caddy v1 had the markdown
directive, which is gone. Instead I found the template
directive, but it does not render the markdown files served.
Caddyfile
:80
templates
encode zstd gzip
root * /static
file_server browse
Starting caddy with
docker run -it --rm --name caddy -p 8080:80 -v $PWD/Caddyfile:/etc/caddy/Caddyfile -v $PWD/static:/static -v caddy_data:/data caddy:2.1.1-alpine
I was only able to manage to serve a html file, that contained {{markdown "Some _markdown_ text"}}
to be rendered, but not a whole index.md
.
How to serve simple markdown files with Caddy v2, or is it not longer possible?