mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
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:
+4
-1
@@ -29,7 +29,10 @@ func vanityHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if r.URL.Query().Get("go-get") == "1" {
|
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
|
return
|
||||||
}
|
}
|
||||||
switch r.URL.Path {
|
switch r.URL.Path {
|
||||||
|
|||||||
Reference in New Issue
Block a user