Hamish
No, .html is normally used for Genshi HTML templates, since in general
the templates themselves are valid XHTML. I don't think anyone has
proposed a new file extension specific to Genshi.
-- Matt Good
It would perhaps make sense for text templates, though, as having a
specific extension would make it easier to trigger an eventual syntax
highlighting of the text templates.
A new MIME type would be useful too, but I guess we could use the
generic text/x-genshi one.
-- Christian
> No, .html is normally used for Genshi HTML templates, since in general
> the templates themselves are valid XHTML.
Indeed, but it seems to me that file extensions aren't just about
formal syntax but also intent; and I'm uneasy about labelling with
.hrml somethig that is not normally intended to be served to a browser.
Both ZPT and Kid, 'ancestors' of Genshi, chose to use a specific
extension. In the case of Kid that was partly so that the compiler
could identify the relevant files. But even that might be an argument
for Genshi adopting a specific extension, in case it too acquires a
compiler.
Hamish
For me, the only advantage of a specific extension is to have vim
insert a skeleton page when starting a file. For existing files, I can
just search for the genshi namespace declaration to get the syntax
file loaded. But mostly, it's a non-issue for me.
Well, I believe one intent with Kid was to make sure your templates
were directly previewable in a browser, as well as being editable by
WYSIWYG editors.
As for compiling the templates see this regarding the Kid code
generation:
http://genshi.edgewall.org/wiki/GenshiFaq#SothenwhynotjustuseKid
I'm not opposed to a file extension, particularly for the text
templates (though XML and text templates should use different
extensions). However, I don't think it's "wrong" to use .html. At
least in the web frameworks I've worked with there are separate
locations for static resources and templates, so confusing the two is
unlikely.
-- Matt Good
> one intent ... was to make sure your templates
> were directly previewable in a browser, as well as being editable by
> WYSIWYG editors. As for compiling the templates ...
OK, ya got me! The consensus seems to be for .html. I'm biting the
bullet and doing likewise rather than being different from the
documentation.
> separate locations for static resources and templates,
> so confusing the two is unlikely.
I agree that adopting that practice helps.
Hamish