about summary refs log tree commit diff stats
path: root/templates/page.templ
diff options
context:
space:
mode:
Diffstat (limited to 'templates/page.templ')
-rw-r--r--templates/page.templ9
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/page.templ b/templates/page.templ
index fb91b23..39dd263 100644
--- a/templates/page.templ
+++ b/templates/page.templ
@@ -4,6 +4,7 @@ import (
 	"io/fs"
 
 	"go.alanpearce.eu/website/internal/config"
+	"net/url"
 )
 
 var (
@@ -86,8 +87,12 @@ templ Page(site *config.Config, page PageSettings) {
 	</html>
 }
 
-func mkURL(u config.URL, path string, title string) string {
-	q := u.Query()
+func mkURL(original config.URL, path string, title string) string {
+	ou := *original.URL
+	u := config.URL{
+		URL: &ou,
+	}
+	q := url.Values{}
 	q.Add("p", path)
 	q.Add("t", title)
 	u.RawQuery = q.Encode()