From 5fe3e7560c9f09e96ec0d68014b863fba4b4b543 Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Sat, 5 Nov 2022 16:27:55 -0500 Subject: [PATCH] A little more OpenGraph flavor --- src/website/education.go | 3 +++ src/website/routes.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/website/education.go b/src/website/education.go index 3f22706..244c91b 100644 --- a/src/website/education.go +++ b/src/website/education.go @@ -91,6 +91,9 @@ func EducationIndex(c *RequestContext) ResponseData { NewArticleUrl: hmnurl.BuildEducationArticleNew(), RerenderUrl: hmnurl.BuildEducationRerender(), } + tmpl.OpenGraphItems = append(tmpl.OpenGraphItems, templates.OpenGraphItem{ + Property: "og:description", Value: "Learn the Handmade way with our curated articles on a variety of topics.", + }) var res ResponseData res.MustWriteTemplate("education_index.html", tmpl, c.Perf) diff --git a/src/website/routes.go b/src/website/routes.go index 028d988..0154d4b 100644 --- a/src/website/routes.go +++ b/src/website/routes.go @@ -118,7 +118,7 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler { hmnOnly.GET(hmnurl.RegexFishbowl, Fishbowl) hmnOnly.GET(hmnurl.RegexEducationIndex, EducationIndex) - hmnOnly.GET(hmnurl.RegexEducationGlossary, EducationGlossary) + hmnOnly.GET(hmnurl.RegexEducationGlossary, educationAuthorsOnly(EducationGlossary)) // TODO: Remove this gate hmnOnly.GET(hmnurl.RegexEducationArticleNew, educationAuthorsOnly(EducationArticleNew)) hmnOnly.POST(hmnurl.RegexEducationArticleNew, educationAuthorsOnly(EducationArticleNewSubmit)) hmnOnly.GET(hmnurl.RegexEducationRerender, educationAuthorsOnly(EducationRerender))