website: add go-source meta tag to link godoc.org to sr.ht repository

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-05-05 20:58:40 +02:00
parent 967484ce3a
commit 78421b9db9
+4 -1
View File
@@ -29,7 +29,10 @@ func vanityHandler(w http.ResponseWriter, r *http.Request) {
return
}
if r.URL.Query().Get("go-get") == "1" {
fmt.Fprintf(w, `<html><head><meta name="go-import" content="gioui.org git https://git.sr.ht/~eliasnaur/gio"></head></html>`)
fmt.Fprintf(w, `<html><head>
<meta name="go-import" content="gioui.org git https://git.sr.ht/~eliasnaur/gio">
<meta name="go-source" content="gioui.org https://git.sr.ht/~eliasnaur/gio https://git.sr.ht/~eliasnaur/gio/tree/master{/dir} https://git.sr.ht/~eliasnaur/gio/tree/master{/dir}/{file}#L{line}">
</head></html>`)
return
}
switch r.URL.Path {