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
Custom templates #3
Comments
A problem might arise when people want to test their HTML templates in-browser while using linked CSS and JS files. While the templates reside in the However, this is not such a big deal, because viewing Go templates in-browser isn't that nice, and just in case anyone wants to do this, he might set symlinks. |
Commit efd27a8 gives us a means of running different commands than just "listen on that port" -- ideal for writing templates to a location. |
Hugh, not closed yet. I forgot the export mechanism. |
The webmaster wants to use custom templates with Gone.
The webmaster wants to extract the standard templates delivered with Gone into a given directory.
Background
Gone uses templates for several pages. Those are at the moment:
These templates are included in the Gone binary. It should be possible to write them into separate files, so that the webmaster can modify them and use his modified versions instead of the default ones.
Convention
In the course of this enhancement, we also need a convention for where templates are stored. I propose to always use a directory
.templates
inside the content root, until we introduce a configuration mechanism.Exporting templates creates this directory, and as soon as the directory exists, it will be used as template source.
The text was updated successfully, but these errors were encountered: