A little more OpenGraph flavor

This commit is contained in:
Ben Visness 2022-11-05 16:27:55 -05:00
parent 084b13ae34
commit 5fe3e7560c
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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))