Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Offer the versions as an option
enable-version-info brings back the cgit and git versions that 872bd7c
took off the footer and the generator tag, for a site that wants them,
and the version f7d2b83 put on the signature of patches now follows it
too. It stays off by default for the reason 872bd7c gave.
Diffstat (limited to 'source/ui-shared.c')
| -rw-r--r-- | source/ui-shared.c | 10 |
1 file changed, 9 insertions, 1 deletion
diff --git a/source/ui-shared.c b/source/ui-shared.c index 8da9878..936a6a4 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1558,7 +1558,10 @@ void cgit_print_docstart(void) html_attr(ctx.cfg.root_desc); html("'>\n"); } - html("<meta name='generator' content='cgit'>\n"); + if (ctx.cfg.enable_version_info) + htmlf("<meta name='generator' content='cgit %s'>\n", cgit_version); + else + html("<meta name='generator' content='cgit'>\n"); if (ctx.cfg.robots && *ctx.cfg.robots) { html("<meta name='robots' content='"); html_attr(ctx.cfg.robots); @@ -1615,6 +1618,11 @@ void cgit_print_docend(void) } if (ctx.cfg.footer) html_include(ctx.cfg.footer); + else if (ctx.cfg.enable_version_info) + htmlf("<footer class='footer'>generated by " + "<a href='https://github.com/brycekwon/cgit'>cgit %s</a> " + "(<a href='https://git-scm.com/'>git %s</a>)</footer>\n", + cgit_version, git_version_string); else html("<footer class='footer'>generated by <a href='https://github.com/brycekwon/cgit'>cgit</a></footer>\n"); html("</div>\n"); |
