From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Tadeusz Sosnierz <tadzikes@gmail.com>, Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 2/4] git-instaweb: Static files are under "static/" in gitweb_conf
Date: Wed, 29 Dec 2010 17:48:14 +0100 [thread overview]
Message-ID: <201012291748.14484.jnareb@gmail.com> (raw)
In-Reply-To: <201012291743.41213.jnareb@gmail.com>
The variables used to compose links for gitweb static files,
i.e. @stylesheets / $stylesheet, $logo, etc. are configurable via
GITWEB_CSS, GITWEB_LOGO, etc. gitweb build configuration variables.
The installation directory of those static files is currently always
set to $(gitwebdir)/static. Thus git-instaweb could rely on the place
where those files are installed, but not on $logo, $favicon
etc. variables.
Set @stylesheets, $logo, $favicon and $javascript to their default
values in gitweb config file for git-instaweb (in gitweb_conf
function), so that web servers invoked by git-instaweb (for example
Plack::Middleware::Static component for 'plackup' web server) can
correctly serve links to those static files.
We assume here that git-instaweb uses modern gitweb with names of
gitweb config variables as mentioned above.
Note that we had to take care that possible optional minimizations of
stylesheet and of javascript is correctly taken into account.
This is continuation of fixup for issue noticed by Tadeusz Sośnierz
with --httpd=plackup and gitweb stylesheet (CSS).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
The subject (commit description) is not the best, but that is what I
was able to come up with.
This doesn't matter for default configuration and setup, but it allows
me to use my custom gitweb build configuration without any changes in
result.
git-instaweb.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index bb57d81..da569f2 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -581,6 +581,11 @@ our \$projectroot = "$(dirname "$fqgitdir")";
our \$git_temp = "$fqgitdir/gitweb/tmp";
our \$projects_list = \$projectroot;
+our @stylesheets = ("static/".basename(\$stylesheets[0]));
+our \$logo = "static/git-logo.png";
+our \$favicon = "static/git-favicon.png";
+our \$javascript = "static/".basename(\$javascript);
+
\$feature{'remote_heads'}{'default'} = [1];
EOF
}
--
1.7.3
next prev parent reply other threads:[~2010-12-29 16:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 16:43 [PATCH 0/4] git-instaweb: Three fixes and one improvement Jakub Narebski
2010-12-29 16:47 ` [BUGFIX PATCH 1/4] git-instaweb: Fix issue with static files for 'plackup' server Jakub Narebski
2010-12-29 23:24 ` Junio C Hamano
2010-12-29 23:52 ` Junio C Hamano
2010-12-30 0:40 ` Jakub Narebski
2010-12-29 16:48 ` Jakub Narebski [this message]
2010-12-29 16:49 ` [PATCH 3/4] git-instaweb: Add checks that web server can be started and is started Jakub Narebski
2010-12-29 16:50 ` [PATCH 4/4] git-instaweb: Use "git-instaweb" as sitename (for page titles) Jakub Narebski
2010-12-30 6:23 ` Eric Wong
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=201012291748.14484.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=tadzikes@gmail.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).