From ae880cb54f43744225768c035bf5a97dc859d4c0 Mon Sep 17 00:00:00 2001 From: Alexander Leonhardt Date: Sat, 15 Aug 2026 10:57:32 +0200 Subject: Added repository section description --- cgit.c | 2 ++ cgit.h | 1 + ui-repolist.c | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/cgit.c b/cgit.c index ca318e8..130f49d 100644 --- a/cgit.c +++ b/cgit.c @@ -97,6 +97,8 @@ void cgit_repo_config(struct cgit_repo *repo, const char *name, const char *valu item->util = strdup_first_line(value); } else if (!strcmp(name, "section")) repo->section = strdup_first_line(value); + else if (!strcmp(name, "section_desc")) + repo->section_desc = strdup_first_line(value); else if (!strcmp(name, "snapshot-prefix")) repo->snapshot_prefix = strdup_first_line(value); else if (!strcmp(name, "readme") && value != NULL) { diff --git a/cgit.h b/cgit.h index 7d7ece7..2e1b40b 100644 --- a/cgit.h +++ b/cgit.h @@ -94,6 +94,7 @@ struct cgit_repo { char *module_link; struct string_list readme; char *section; + char *section_desc; char *clone_url; char *logo; char *logo_link; diff --git a/ui-repolist.c b/ui-repolist.c index 1b224cf..265d450 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -317,6 +317,11 @@ void cgit_print_repolist(void) columns); html_txt(section); html(""); + if(ctx.repo->section_desc != NULL) { + htmlf("", columns); + html_txt(ctx.repo->section_desc); + html(""); + } last_section = section; } htmlf("", -- cgit