Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Is there a static site generator out there that doesn't require a ridiculous build process every time I do an update?

I am experimenting with Caddy's template functionality [0] in my pursuit of making dependency-free and buildless websites. Caddy's templates are inspired by the Server Side Include (SSI) functionality in Apache and Nginx, except it uses Golang's syntax. I have made several websites in Hugo and find it pleasantly similar, only more bear-bones.

Although Caddy is serving static sites to the browser, it is technically more like using a dynamic scripting language like PHP on the server. I guess Caddy templates outperform PHP by a large margin because it is written in Golang and compiled, but I have never tested this hypothesis.

Funfact: Caddy's entire website is written with Caddy's template system and the source code is available [1] for those who want to take a look!

[0] https://caddyserver.com/docs/modules/http.handlers.templates

[1] https://github.com/caddyserver/website



To add onto this, we recently added plugin support for templates, so you can write your own template functions if you'd like! https://github.com/caddyserver/caddy/pull/4757


Have you considered adding WASM / WAGI support?


Not really; it's already really easy to write plugins for Caddy in Go, so we haven't really seen the need. See here: https://caddyserver.com/docs/extending-caddy

You could write your own plugin that calls out to your WASM layer if you want, but I'm not sure we need that built into Caddy. It would be extremely niche, I think.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: