Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Making partials #86

Open
alfawal opened this issue Jan 22, 2022 · 1 comment
Open

[Feature request] Making partials #86

alfawal opened this issue Jan 22, 2022 · 1 comment

Comments

@alfawal
Copy link
Contributor

alfawal commented Jan 22, 2022

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

@tulir
Copy link
Member

tulir commented Feb 20, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants