From: Xypron <xypron.glpk@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] gitweb: add readme to overview page
Date: Fri, 30 Nov 2012 02:11:43 +0100 [thread overview]
Message-ID: <50B807CF.1040803@gmx.de> (raw)
In-Reply-To: <50B7E1FD.8060001@gmx.de>
The following setting provides the same feature
# html text to include at home page
$home_text = "indextext.html";
Sorry for the noise.
Best regards
Heinrich Schuchardt
On 29.11.2012 23:30, Xypron wrote:
> Hello Junio,
>
> thank you for your comment in message
> <7vip9ak971.fsf@alter.siamese.dyndns.org>
> that message <1352652039-31453-1-git-send-email-xypron.glpk@gmx.de>
> lost the thread context.
>
> As already described I would be happy if a README.html could be added to
> the overview page of gitweb.
>
> Please, find below an updated patch. Compared to the first version of my
> patch it avoids a warning concerning doubled slashes in filenames and adds
> a subtitle "projects" between the README and the project list.
>
> Best regards
>
> Heinrich Schuchardt
>
> Subject: [PATCH] gitweb: add readme to overview page
>
> For repositories it is possible to maintain a README.html which will
> be shown on the summary page. This is not possible for the server
> root.
>
> German law requires to provide contact data on the web server. This
> data could easily be entered in the overview page using a README.html.
>
> Furthermore it is possible to put the repositories not directly into
> the root directory but into a subdirectory. Here also a README.html
> would be helpful to indicate what the subdirectory is about.
>
> The patch introduces README.html functionality for the root directory
> and all subdirectories.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> gitweb/gitweb.perl | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index e8812fa..618b0d8 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -6368,6 +6368,19 @@ sub git_project_list {
> }
>
> git_project_search_form($searchtext, $search_use_regexp);
> + # If XSS prevention is on, we don't include README.html.
> + # TODO: Allow a readme in some safe format.
> + my $path = "";
> + if (defined $project_filter) {
> + $path = "/$project_filter";
> + }
> + if (!$prevent_xss && -s "$projectroot$path/README.html") {
> + print "<div class=\"title\">readme</div>\n" .
> + "<div class=\"readme\">\n";
> + insert_file("$projectroot$path/README.html");
> + print "\n</div>\n"; # class="readme"
> + }
> + print "<div class=\"title\">projects</div>\n";
> git_project_list_body(\@list, $order);
> git_footer_html();
> }
prev parent reply other threads:[~2012-11-30 1:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-11 15:32 [PATCH] gitweb: add readme to overview page Heinrich Schuchardt
2012-11-29 22:30 ` Xypron
2012-11-30 1:11 ` Xypron [this message]
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=50B807CF.1040803@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).