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

Multiple templates in one file #2

Open
lpil opened this issue Jan 4, 2022 · 4 comments
Open

Multiple templates in one file #2

lpil opened this issue Jan 4, 2022 · 4 comments

Comments

@lpil
Copy link

lpil commented Jan 4, 2022

Hello! Super cool tool 💜

What would you think of having multiple templates compiled into one module? I think it would be nice to keep them together.

@michaeljones
Copy link
Owner

Good idea. I guess it could scope all templates together into one file and just name the render methods after the template file name. So like user_profile and user_profile_builder (for the one that outputs the stringbuilder if that is useful.)

@michaeljones
Copy link
Owner

@lpil - I've clearly forgotten about this. I'm happy to take a swing at it but only if you would still find it useful.

I thought maybe a config entry in gleam.toml might work? To give the name of the final module? Or I guess all templates in a single folder could be collected together into a single templates.gleam module in that folder? Not sure.

Happy to give it a go. Happy to close it :)

@lpil
Copy link
Author

lpil commented Oct 10, 2022

I don't have a pressing need, so perhaps we can just leave this open for anyone who finds it handy or interesting :)

@michaeljones
Copy link
Owner

Good to know. We can leave it open.

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