X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/fb804a353780633b23a5452b3893fcc9f3705431..c4fbb99cee30fa295e240b429b2dc7e8ad83d535:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index ce806f6..a63dcb0 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -10,6 +10,7 @@ #include "ui-shared.h" #include "cmd.h" #include "html.h" +#include "version.h" static const char cgit_doctype[] = "\n"; @@ -151,6 +152,14 @@ const char *cgit_repobasename(const char *reponame) return rvbuf; } +const char *cgit_snapshot_prefix(const struct cgit_repo *repo) +{ + if (repo->snapshot_prefix) + return repo->snapshot_prefix; + + return cgit_repobasename(repo->url); +} + static void site_url(const char *page, const char *search, const char *sort, int ofs, int always_root) { char *delim = "?"; @@ -785,8 +794,8 @@ void cgit_print_docend(void) if (ctx.cfg.footer) html_include(ctx.cfg.footer); else { - htmlf("