Subject: About as default page
Date: Thu, 03 Jul 2014 20:41:28 +0200 [thread overview]
Message-ID: <53B5A3D8.5090702@chimrod.com> (raw)
In-Reply-To: <mailman.0.1404411897.25081.cgit@lists.zx2c4.com>
Hello everybody.
I recently installed cgit and made a little change from default project
page for the about page (if exists).
In master you have the following url :
git.domain.tld/project/ -> redirect to summary
git.domain.tld/project/summary -> redirect to summary
git.domain.tld/project/about -> redirect to about
with my patch the same urls acts as follow :
if an about page exists : git.domain.tld/project/ -> redirect to about
if no about page exists : git.domain.tld/project/ -> redirect to summary
the patch is very simple[1] and relies on a virtual page named ? main ?
due to cgit limitations (when a project is loaded, we don't know yet if
an about exists or not, so we can't decide if the request to / should be
executed as /summary or /about. We only get this information when we
have begun to process the request. So I created a redirection to a new
action (? main ?), wich act as a proxy redirection).
Feel free to include this patch in the master branch, my repo is open ^^
[1]
http://git.chimrod.com/cgit/commit/?h=about&id=36dd30afed43323dde1aeea0490e86f2db7a2c1d
--
S?bastien Dailly
parent reply other threads:[~2014-07-03 18:41 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <mailman.0.1404411897.25081.cgit@lists.zx2c4.com>]
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=53B5A3D8.5090702@chimrod.com \
--to=cgit@lists.zx2c4.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).