public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail•com>
To: "Lénaïc Huard" <lenaic@lhuard•fr.eu.org>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] gitweb: provide a way to customize html headers
Date: Mon, 17 Oct 2011 13:56:59 +0200	[thread overview]
Message-ID: <201110171357.00278.jnareb@gmail.com> (raw)
In-Reply-To: <201110170928.56075.lenaic@lhuard.fr.eu.org>

On Mon, 17 Oct 2011, Lénaïc Huard wrote:
> 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

Hmmm... the modern recommendation from both Google and Yahoo is to put
script tags at the end of HTML, just before closing </body>, which you
can do nowadays with $site_footer / GITWEB_SITE_FOOTER.

But I guess that analytics script needs to be loaded earlier.

> > > 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?

I think it might be a better solution.
 

> > > ---
> > >  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.

You might have to wait a bit till patches containing gitweb.conf(5)
manpage are merged in, and rebase your patch to add information about
new config variable not to gitweb/INSTALL, but to Documentation/gitweb.conf.txt

-- 
Jakub Narebski
Poland

  reply	other threads:[~2011-10-17 11:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17  7:28 [PATCH] gitweb: provide a way to customize html headers Lénaïc Huard
2011-10-17 11:56 ` Jakub Narebski [this message]
2011-10-20 22:46   ` Lénaïc Huard
2011-10-21  0:37     ` Junio C Hamano
2011-10-21  7:09       ` Lénaïc Huard
2011-10-21 19:14     ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2011-10-16 20:56 Lénaïc Huard
2011-10-16 21:26 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201110171357.00278.jnareb@gmail.com \
    --to=jnareb@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=lenaic@lhuard$(echo .)fr.eu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox