git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: provide a way to customize html headers

From
LHLénaïc Huard <lenaic@lhuard.fr.eu.org>
Date
Oct 17, 2011, 07:28 UTC
Message-ID
<201110170928.56075.lenaic@lhuard.fr.eu.org>
Jakub Narebski <jnareb@gmail.com> writes:
> Lénaïc Huard <lenaic@lhuard.fr.eu.org> writes:
> > This allows web sites to add some specific html headers to the pages
> > generated by gitweb.
> What do you need this for?

I want to decorate the gitweb pages with the “Google Analytics” tracking code. In order to do so, today, Google is recommending to add a <script> tag just before the closing </head> tag.

https://www.google.com/support/analyticshelp/bin/answer.py?answer=1008080&hl=en
> > The new variable $site_htmlheader can be set to a filename the content
> > of which will be inserted at the end of the <head> section of each
> > page generated by gitweb.
> Hmmm... I wonder if a file with html header fragment (which is quite
> specific subset of HTML) is a best solution.

That’s true. The piece of code to be inserted in <head> is maybe small enough so that we don’t need a file. Maybe $site_htmlheader could contain directly the html snippet to be inserted in the pages?

> > Signed-off-by: L=FE=FF=00=E9na=FE=FF=00=EFc Huard <lenaic@lhuard.fr.eu.or=
g>
> > ---
> >  gitweb/INSTALL     |    3 +++
> Nb. there is patch in flight adding gitweb.conf(5) and gitweb(1)
> manpages...

Ok. So, I’ll update them once a decision will be taken concerning this $site_htmlheader.

-- 
Lénaïc Huard
Next: Jakub Narebski
Message 1 of 6 in “Re: [PATCH] gitweb: provide a way to customize html headers”
  1. Lénaïc HuardOct 17, 2011
  2. Jakub NarebskiOct 17, 2011
  3. Lénaïc HuardOct 20, 2011
  4. Junio C HamanoOct 21, 2011
  5. Lénaïc HuardOct 21, 2011
  6. Jakub NarebskiOct 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.