From 7e1ecc4df44d20d2c9de1c8885ddc2c188062ef0 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Wed, 3 Jul 2024 12:36:05 +0200 Subject: Initial implementation of the gemtext template extension --- example/Caddyfile | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'example/Caddyfile') diff --git a/example/Caddyfile b/example/Caddyfile index 8f08483..aa12136 100644 --- a/example/Caddyfile +++ b/example/Caddyfile @@ -1,12 +1,29 @@ { debug admin off - log { - level debug - } + auto_https off + http_port 8000 } -http://localhost:8000 { - root * ./examples/static - file_server +http://template.localhost { + root example/static + + # If the path exists in the static directory then serve it directly + @static file {path} {path}/ + route @static { + file_server + } + + # Otherwise send it through the template, which will look for a matching gmi + # file to render. + route { + rewrite * /tpl/render_gemtext.html + root example + templates { + extensions { + gemtext + } + } + file_server + } } -- cgit v1.2.3