about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ui-shared.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 4e317d0..cd97ffb 100644 --- a/ui-shared.c +++ b/ui-shared.c
@@ -660,6 +660,15 @@ void cgit_print_http_headers(void)
660 exit(0); 660 exit(0);
661} 661}
662 662
663static void print_rel_vcs_link(const char *url)
664{
665 html("<link rel='vcs-git' href='");
666 html_attr(url);
667 html("' title='");
668 html_attr(ctx.repo->name);
669 html(" Git repository'/>\n");
670}
671
663void cgit_print_docstart(void) 672void cgit_print_docstart(void)
664{ 673{
665 if (ctx.cfg.embedded) { 674 if (ctx.cfg.embedded) {
@@ -698,6 +707,8 @@ void cgit_print_docstart(void)
698 html("' type='application/atom+xml'/>\n"); 707 html("' type='application/atom+xml'/>\n");
699 strbuf_release(&sb); 708 strbuf_release(&sb);
700 } 709 }
710 if (ctx.repo)
711 cgit_add_clone_urls(print_rel_vcs_link);
701 if (ctx.cfg.head_include) 712 if (ctx.cfg.head_include)
702 html_include(ctx.cfg.head_include); 713 html_include(ctx.cfg.head_include);
703 html("</head>\n"); 714 html("</head>\n");