summaryrefslogtreecommitdiffstats
path: root/templates/ng
diff options
context:
space:
mode:
authorNathan Zadoks <nathan@nathan7.eu>2015-10-30 13:52:36 +0100
committerNathan Zadoks <nathan@nathan7.eu>2015-10-30 14:00:09 +0100
commit4323a89c0354e4f25dbffc4b77c1e3f9ba68ba24 (patch)
tree2f9835381733f54d473556b840539a7b6000ff4a /templates/ng
parent102b675f96eb4340c35376ddd33385f4f20ef091 (diff)
downloadgitea-4323a89c0354e4f25dbffc4b77c1e3f9ba68ba24.tar.gz
gitea-4323a89c0354e4f25dbffc4b77c1e3f9ba68ba24.zip
Add go-source directive to repo pages
This makes Gogs repos work with godoc.org: https://github.com/golang/gddo/wiki/Source-Code-Links
Diffstat (limited to 'templates/ng')
-rw-r--r--templates/ng/base/head.tmpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/ng/base/head.tmpl b/templates/ng/base/head.tmpl
index 2a13036ec4..dbf801c66b 100644
--- a/templates/ng/base/head.tmpl
+++ b/templates/ng/base/head.tmpl
@@ -8,7 +8,10 @@
<meta name="keywords" content="go, git, self-hosted, gogs">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="{{.CsrfToken}}" />
- {{if .GoGetImport}}<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">{{end}}
+ {{if .GoGetImport}}
+ <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
+ <meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
+ {{end}}
<link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />