diff options
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index d2358f2..ae2dea2 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -809,6 +809,23 @@ void cgit_print_docstart(void) strbuf_release(&sb); free(fileurl); } + if (host && ctx.repo) { + char *repourl = cgit_repourl(ctx.repo->url); + if (repourl[strlen(repourl)-1] == '/') { + repourl[strlen(repourl)-1] = '\0'; + } + + html("<meta name='go-import' content='"); + html_attr(host); + html_attr(repourl); + html(" git "); + html(cgit_httpscheme()); + html_attr(host); + html_attr(repourl); + html("'/>\n"); + + free(repourl); + } if (ctx.repo) cgit_add_clone_urls(print_rel_vcs_link); if (ctx.cfg.head_include) |