diff --git a/handler.go b/handler.go index bfe3f32..6f5a3f9 100644 --- a/handler.go +++ b/handler.go @@ -84,7 +84,7 @@ func newHandler(config []byte) (*handler, error) { func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { current := r.URL.Path - pc, _ := h.paths.find(current) + pc, subpath := h.paths.find(current) if pc == nil && current == "/" { h.serveIndex(w, r) return @@ -96,11 +96,13 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if err := vanityTmpl.Execute(w, struct { Import string + Subpath string Repo string Display string VCS string }{ Import: h.Host(r) + pc.path, + Subpath: subpath, Repo: pc.repo, Display: pc.display, VCS: pc.vcs, @@ -149,10 +151,10 @@ var vanityTmpl = template.Must(template.New("vanity").Parse(` - + -Nothing to see here; see the package on godoc. +Nothing to see here; see the package on godoc. `))