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
_______________________________________________
CGit mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to