4 ms·
In the 90s, we used Server Side Includes (SSI) for this. Probably still works.
by recursive 2y ago
In the 90s, we used Server Side Includes (SSI) for this. Probably still works.
- skyfaller 2y agoOne modern approach would be Caddy Server's templates, using Golang templating: https://caddyserver.com/docs/modules/http.handlers.templates https://caddyserver.com/docs/modules/http.handlers.templates The "include" function should do the job: {{include "path/to/file.html"}}
- ZYbCRq22HbJ2y7 2y agohttpd, nginx, a number of other servers support SSI https://nginx.org/en/docs/http/ngx_http_ssi_module.html https://nginx.org/en/docs/http/ngx_http_ssi_module.html Caddy chose not to, I guess? https://caddy.community/t/caddy-update-on-ssi-server-side-includes/400 https://caddy.community/t/caddy-update-on-ssi-server-side-in...
- alwillis 2y agoYou generally can’t use SSI on many popular platforms for static websites like Netlify, etc.
- someothherguyy 2y agoHowever, you could generate the static HTML easily and then publish it on those platforms, which is what many people do today (probably not often using SSI).