-
Notifications
You must be signed in to change notification settings - Fork 26
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
Embed the templates into the binary #10
Comments
That would be great yeah—if you'd like to give it a go, patches welcome. |
I have implemented this change in #18. But I just realized that we don't need template path in I will fix this tomorrow evening, it's quite late here. |
You should embed the static resources in the binary too IMO 👌 |
We should keep the |
I was thinking if the path for |
Ah yeah, that would be a nice way to do it. |
Implementation for embed of templates and static is complete. Please review #18 |
Normally for most of my projects, I support using/loading templating / static resources from disk by "debug mode", production builds setups always use the embedded versions, unless an option like Maybe |
I've proposed something to that end in the PR, #18. It's relatively straightforward nowadays to do a real filesystem with fallback to embedded assets thanks to the |
This was actually my initial approach but there were some issues so I decided to go with current implementation. I will take another look at it when I have some free time. |
Hey, after building the binary and moving it in
~/.local/bin
it didn't work, since you need the templates.I would be cool if the default templates were used when you don't specify a templates directory by embedding them using
embed.FS
The text was updated successfully, but these errors were encountered: