From cad8bb75363323e25422cbed76b45de07fa510ec Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 5 Sep 2021 22:54:29 +0200 Subject: Set the default page to /about --- ui-shared.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'ui-shared.c') diff --git a/ui-shared.c b/ui-shared.c index 6fae72d..a2fd54a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -128,7 +128,13 @@ const char *cgit_loginurl(void) login_url = fmtalloc("%s?p=login", cgit_rooturl()); return login_url; } - +char *cgit_repourl_about(const char *reponame) +{ + if (ctx.cfg.virtual_root) + return fmtalloc("%s%s/about", ctx.cfg.virtual_root, reponame); + else + return fmtalloc("?r=%s&page=about", reponame); +} char *cgit_repourl(const char *reponame) { if (ctx.cfg.virtual_root) @@ -330,6 +336,11 @@ static void reporevlink(const char *page, const char *name, const char *title, html(""); } +void cgit_about_link(const char *name, const char *title) +{ + reporevlink("about", name, title, NULL, NULL, NULL, NULL); +} + void cgit_summary_link(const char *name, const char *title, const char *class, const char *head) { -- cgit v1.2.3-70-g09d2