From f07a80ee43ba6358585357a3866748897dcb901e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 26 Oct 2026 22:56:17 -1000 Subject: Name the page first in every title Summary, about, log, refs, tag and stats pages shared one title, so tabs, history and search results could not tell them apart. Titles now read page, repository and site, with root-title as the site, and the description stays in the meta description, where search engines read it. --- source/cmd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source/cmd.c') diff --git a/source/cmd.c b/source/cmd.c index 8f89e3b..22a6c19 100644 --- a/source/cmd.c +++ b/source/cmd.c @@ -43,10 +43,12 @@ static void about_fn(void) return; } if (!ctx.repo) { + cgit_prefix_title("about"); cgit_print_site_readme(); return; } if (ctx.repo->readme.nr) { + cgit_prefix_title("about"); cgit_print_repo_readme(); return; } @@ -83,6 +85,7 @@ static void commit_fn(void) static void diff_fn(void) { + cgit_prefix_title("diff"); cgit_print_diff(ctx.qry.oid, ctx.qry.oid2, ctx.qry.path, 1, 0); } @@ -93,6 +96,7 @@ static void info_fn(void) static void log_fn(void) { + cgit_prefix_title("log"); cgit_print_log( ctx.qry.oid, ctx.qry.ofs, ctx.cfg.max_commit_count, ctx.qry.grep, ctx.qry.search, ctx.qry.path, 1, ctx.repo->enable_commit_graph, @@ -140,6 +144,7 @@ static void rawdiff_fn(void) static void refs_fn(void) { + cgit_prefix_title("refs"); cgit_print_refs(); } @@ -155,10 +160,12 @@ static void snapshot_fn(void) static void stats_fn(void) { - if (ctx.repo->max_stats) + if (ctx.repo->max_stats) { + cgit_prefix_title("stats"); cgit_show_stats(); - else + } else { cgit_print_error_page(404, "Not Found", "Stats are disabled"); + } } static void summary_fn(void) -- cgit 2.12.1