all repos — gopkgs @ d378084c72c2d3b7b198838357b17f279e506453

Go module vanity import paths

show badges from pkg.go.dev

Alan Pearce
commit

d378084c72c2d3b7b198838357b17f279e506453

parent

b70c509077939606bb065917d62ed7e1bd683de6

1 file changed, 6 insertions(+), 1 deletion(-)

changed files
M templates.gotemplates.go
@@ -150,5 +150,10 @@ )
} func GodocBadge(config *Config, pkg string) g.Node { - return A(Href(godocURL(config, pkg)), g.Text("Go Reference")) + return A(Href(godocURL(config, pkg)), + Img( + Alt("Go Reference"), + Src(badgeURL(config, pkg)+".svg"), + ), + ) }