Creating new hgweb + hgwebdir theme
Paul Boddie
paul.boddie at biotek.uio.no
Tue Nov 23 11:17:10 UTC 2010
Dirkjan Ochtman wrote:
> On Mon, Nov 22, 2010 at 23:56, Philip Pemberton <lists at philpem.me.uk> wrote:
>
>> Question: do templates have to be installed in (say)
>> /usr/share/mercurial/templates, or will Hg pick them up if I put them in the
>> same directory as Hgweb.cgi / hgwebdir.cgi?
>>
>
> You can point your hgweb install to your templates dir by setting the
> web.templates variables in a hgrc.
>
Interesting to know and now added to the Theming page on the Wiki.
>> Also, has anyone created any alternative themes, besides those included with
>> Hgweb?
>>
>
> Mozilla has a slightly different version of gitweb, but I'm not aware
> of any interesting themes here. One problem is that the hg templater
> is relatively limited.
>
The principal issue with the templater, as far as I've discovered, is
mentioning on the Theming page:
http://mercurial.selenic.com/wiki/Theming#Limitations_of_Inclusion
Otherwise, it's just a matter of knowing which variables exist and what
they actually yield. This has changed over time, so it requires some
experimentation if you're writing themes for an older version of
Mercurial as well as for the latest version. Of course, you're limited
by what each "command" provides to any given template.
I showed a theme before on this list:
http://hgweb.boddie.org.uk/
It's not quite complete - I've been making the graph view use SVG
instead of an HTML canvas (which you won't see on that site because it
uses an older version of Mercurial) - but it shows what you can do.
Paul
More information about the Mercurial
mailing list