This commit is contained in:
Max 2023-11-24 14:09:15 +08:00
parent 4bc84c3623
commit 26b03fe8a0

View file

@ -141,7 +141,15 @@ func (page *Page) Link(r *Request) string {
paths = append(paths, part)
}
return filepath.Join(paths...)
url := filepath.Join(paths...)
if r.Query != nil {
query := r.Query.Encode()
if query != "" {
url = url + "?" + query
}
}
return url
}
// ReplaceDocument replace the document