-rw-r--r-- | cgit.c | 3 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | ui-shared.c | 5 |
3 files changed, 8 insertions, 1 deletions
@@ -14,16 +14,18 @@ #include "ui-shared.h" const char *cgit_version = CGIT_VERSION; void config_cb(const char *name, const char *value) { if (!strcmp(name, "root-title")) ctx.cfg.root_title = xstrdup(value); + else if (!strcmp(name, "root-desc")) + ctx.cfg.root_desc = xstrdup(value); else if (!strcmp(name, "css")) ctx.cfg.css = xstrdup(value); else if (!strcmp(name, "logo")) ctx.cfg.logo = xstrdup(value); else if (!strcmp(name, "index-header")) ctx.cfg.index_header = xstrdup(value); else if (!strcmp(name, "index-info")) ctx.cfg.index_info = xstrdup(value); @@ -154,16 +156,17 @@ static void prepare_context(struct cgit_context *ctx) ctx->cfg.max_commit_count = 50; ctx->cfg.max_lock_attempts = 5; ctx->cfg.max_msg_len = 60; ctx->cfg.max_repodesc_len = 60; ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s"; ctx->cfg.renamelimit = -1; ctx->cfg.robots = "index, nofollow"; ctx->cfg.root_title = "Git repository browser"; + ctx->cfg.root_desc = "a fast webinterface for the git dscm"; ctx->cfg.script_name = CGIT_SCRIPT_NAME; ctx->page.mimetype = "text/html"; ctx->page.charset = PAGE_ENCODING; ctx->page.filename = NULL; } static int cgit_prepare_cache(struct cacheitem *item) { @@ -127,16 +127,17 @@ struct cgit_config { char *index_header; char *index_info; char *logo; char *logo_link; char *module_link; char *repo_group; char *robots; char *root_title; + char *root_desc; char *script_name; char *virtual_root; int cache_dynamic_ttl; int cache_max_create_time; int cache_repo_ttl; int cache_root_ttl; int cache_static_ttl; int enable_index_links; diff --git a/ui-shared.c b/ui-shared.c index 8a804c2..83758f7 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -505,17 +505,20 @@ void cgit_print_pageheader(struct cgit_context *ctx) html("</td></tr>\n"); html("<tr><td class='sub'"); if (ctx->repo) { html(" colspan='2'>"); html_txt(ctx->repo->desc); } else { html(">"); - html_txt("a fast webinterface for the git dscm"); + if (ctx->cfg.root_desc) + html_txt(ctx->cfg.root_desc); + else if (ctx->cfg.index_info) + html_include(ctx->cfg.index_info); } html("</td></tr></table>\n"); html("<table class='tabs'><tr><td>\n"); if (ctx->repo) { reporevlink(NULL, "summary", NULL, hc(cmd, "summary"), ctx->qry.head, NULL, NULL); cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, |