|
|
|
|
|
by alin23
1280 days ago
|
|
After building SPAs in next.js and blogs in Hugo, I finally settled on the simplest stack: Caddy+Markdown/HTML templates I’ve talked about it more here: https://notes.alinpanaitiu.com/How%20I%20write%20this%20blog... But the gist is that you have a Caddyfile like: http://localhost, notes.alinpanaitiu.com {
root * /static/notes/
file_server
templates {
mime text/html text/plain text/xml
}
encode zstd gzip
try_files {path} /index.html?path={path}
}
…and any .md inside /static/notes will be rendered to HTML, plus any .html/.xml will support Go template syntax.This comes with the benefit of automatic HTTPS, asset compression and a one binary server. Deploying is as simple as copying the folder with the Caddyfile and assets to my public server and running “caddy run” |
|