@@ 188,7 188,7 @@ func BuildLinks(r *http.Request, jrnl *Jrnl) template.HTML {
return template.HTML("")
}
- pfx := strings.Repeat("../", strings.Count(r.URL.Path, "/"))
+ pfx := strings.Repeat("../", strings.Count(r.URL.Path, "/") - 1)
links := fmt.Sprintf("<a href=\"%sdash\">dash</a>", pfx)
years, _ := jrnl.ListYears()
@@ 249,7 249,7 @@ type NtriesPageData struct {
Pfx string
}
func NtriesPage(w http.ResponseWriter, r *http.Request, jrnl *Jrnl, Title, Blurb string, ntries []EntryVersion) {
- pfx := strings.Repeat("../", strings.Count(r.URL.Path, "/"))
+ pfx := strings.Repeat("../", strings.Count(r.URL.Path, "/") - 1)
ReplyTemplate(
w, r, jrnl, "ntries.html",
NtriesPageData {