From dfaafb8e760aed254d38ea91b5713dca178bde54 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Fri, 28 Jun 2024 07:35:32 -0600 Subject: [PATCH] gobwebs bump to allow variable overrides --- cmd/links/main.go | 3 +++ cmd/list/main.go | 3 +++ cmd/short/main.go | 3 +++ go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmd/links/main.go b/cmd/links/main.go index c2024f6..e254257 100644 --- a/cmd/links/main.go +++ b/cmd/links/main.go @@ -284,6 +284,9 @@ func run() error { "addQueryElement": links.AddQueryElement, "getAddLinkURL": links.GetAddLinkURL, }) + srv.TemplateAllowOverride( + "seoData", + ) err = srv.LoadTemplatesFS(links.TemplateFS, "templates/*.html", "templates/*.txt") if err != nil { return err diff --git a/cmd/list/main.go b/cmd/list/main.go index 06c990c..2191071 100644 --- a/cmd/list/main.go +++ b/cmd/list/main.go @@ -123,6 +123,9 @@ func run() error { return date.Format(links.LongDateLayout) }, }) + srv.TemplateAllowOverride( + "seoData", + ) err = srv.LoadTemplatesFS(links.TemplateFS, "templates/base.html", "templates/listing_detail.html") if err != nil { return err diff --git a/cmd/short/main.go b/cmd/short/main.go index 1475409..f3ef996 100644 --- a/cmd/short/main.go +++ b/cmd/short/main.go @@ -105,6 +105,9 @@ func run() error { return url }, }) + srv.TemplateAllowOverride( + "seoData", + ) err = srv.LoadTemplatesFS( links.TemplateFS, "templates/restriction_redirect.html", diff --git a/go.mod b/go.mod index 16bdc3f..4b0e7da 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( golang.org/x/image v0.0.0-20211028202545-6944b10bf410 golang.org/x/net v0.24.0 golang.org/x/text v0.14.0 - netlandish.com/x/gobwebs v0.0.0-20240612202419-2b1c11c95417 + netlandish.com/x/gobwebs v0.0.0-20240628133233-8fea7ee22ba2 netlandish.com/x/gobwebs-formguard v0.0.0-20231224192353-29706d23f156 netlandish.com/x/gobwebs-oauth2 v0.0.0-20240216010400-f0f42e2e3a7c netlandish.com/x/gobwebs-ses-feedback v0.0.0-20231224192331-d90c2b73e55d diff --git a/go.sum b/go.sum index 54da330..1ff8211 100644 --- a/go.sum +++ b/go.sum @@ -2556,8 +2556,8 @@ modernc.org/z v1.0.1-0.20210308123920-1f282aa71362/go.mod h1:8/SRk5C/HgiQWCgXdfp modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= modernc.org/z v1.2.20/go.mod h1:zU9FiF4PbHdOTUxw+IF8j7ArBMRPsHgq10uVPt6xTzo= modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4= -netlandish.com/x/gobwebs v0.0.0-20240612202419-2b1c11c95417 h1:/4RB3RCC25e4epDGYL9e6JEV6X6DxcSu52yAHIw/5Xg= -netlandish.com/x/gobwebs v0.0.0-20240612202419-2b1c11c95417/go.mod h1:LhQe3AAqBCuUya1XJQcj7GxzkFo6Ap/vB5wU/bzlzLc= +netlandish.com/x/gobwebs v0.0.0-20240628133233-8fea7ee22ba2 h1:+B/jl2Q6Wqc/RZUJRnLH7aWjn3umEEtHPPIYxg7HX6k= +netlandish.com/x/gobwebs v0.0.0-20240628133233-8fea7ee22ba2/go.mod h1:LhQe3AAqBCuUya1XJQcj7GxzkFo6Ap/vB5wU/bzlzLc= netlandish.com/x/gobwebs-formguard v0.0.0-20231224192353-29706d23f156 h1:kbYL/3PDS6Pt5uE5QJWkVIgd+kzUgUUb3IKhAth35Bc= netlandish.com/x/gobwebs-formguard v0.0.0-20231224192353-29706d23f156/go.mod h1:+73MG8iQ7+cs1rbcbgBEJd5so1TyFNmqrwLNKtDUAvg= netlandish.com/x/gobwebs-oauth2 v0.0.0-20240216010400-f0f42e2e3a7c h1:OiR7uZB8Ix33d6uZcNucqWC53XQlJLqH5MyskIaFD20= -- 2.45.2