4 ms·
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:
by alin23 4y 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%20on%20my%20iPhone%20in%20a%20train 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”
- code_lettuce 4y agoThis is the kind of content I come to HN for. I love that you found a solution that works best for you. Hopefully many other iPhone owning, train commuters with thoughts worth sharing pick this up. :)
- alin23 4y agoThank you ^_^
- qup 4y agoThis is very cool, thanks for sharing. I just built a jekyll site and have plans for another SG site, so this is likely to get played with.