dontasktoask.com icon indicating copy to clipboard operation
dontasktoask.com copied to clipboard

[Feature request] Making partials

Open alfawal opened this issue 3 years ago • 1 comments

Having a multiple files with almost the same header/footer(/sidebar) is a bad design. So we might consider breaking the layout into smaller flexible files using HTML's <!--#include file="partial.html"--> or EJS's <% include partials/partial.ejs %>. I do support moving into EJS because you can also pass some parameters in flexible ways. What do you think @tulir

alfawal avatar Jan 22 '22 11:01 alfawal

The headers don't have that much content and the footer can be translated (meaning a partial wouldn't help there), so I don't think it's too bad right now, but I guess it'll be more relevant with #85.

Caddy templates and the include directive are the best way, no reason to involve JavaScript.

tulir avatar Feb 20 '22 18:02 tulir