From: Jakub Narebski Date: Thu, 25 Sep 2008 16:52:22 GMT Subject: Re: [RFC] gitweb wishlist and TODO list (templating) Message-ID: <200809251852.23315.jnareb@gmail.com> In-Reply-To: <20080925133320.GK10360@machine.or.cz> Petr Baudis wrote: > On Thu, Sep 25, 2008 at 03:19:09PM +0200, Wincent Colaiuta wrote: > > > > One which I'm looking at doing is supporting reading the "README.html" from > > the tree indicated by the current HEAD instead of reading it from a file in > > the .git directory. [...] > > Obviously, will have to make this optional and configurable. I'm thinking > > of providing a means of specifying the filename to look for (no filename, > > the default, means don't look), and also a setting to indicate the content > > type of the file (either plain text, which would be wrapped in a > >
 block with HTML entities used where appropriate, or HTML which 
> > would be included verbatim).
> 
> In my queue and something I will hopefully get to submit tomorrow or at
> the beginning of next week is actually support for full-blown templating
> of gitweb pages (customization of the summary page, even adding extra
> project actions) based on gitconfig-style specification within the
> project HEAD. In its simplest variant, this could be used for including
> a README from the HEAD tree as well, I think. But it's in the same class
> as the git-gui support for the 'publish' dialog, something potentially
> useful for others, but not *universally* useful and in this case,
> unfortunately somewhat invasive.

I think that making gitweb use something like Gitweb::Template, where
action appearance is governed by templates, be it something like
git-for-each-ref --format or StGit *.tmpl files, or XSLT / XSL,
could be a good idea.  But I think _that_ would require almost writing
from scratch, certainly making it long-term gitweb fork, perhaps even
with different name (and not residing inside git.git repository).

We can discuss this idea here in this subthread.  For example: do
create Gitweb::Template like HTML::Template or use Template Toolkit;
which parts put in template and which in "gitweb" driver, etc.

-- 
Jakub Narebski
Poland