factored out the need for amsterdam_pageTitle by having FrameTitle be a separate bit of metadata in AmContext

This commit is contained in:
2026-02-10 21:10:20 -07:00
parent 09842a91bd
commit f2b8b829aa
18 changed files with 65 additions and 46 deletions
+2 -2
View File
@@ -236,7 +236,7 @@ func templateTopicLink(args jet.Arguments) reflect.Value {
*/
func TopPage(ctxt ui.AmContext) (string, any) {
// Set the page title.
ctxt.VarMap().Set("amsterdam_pageTitle", "My Front Page")
ctxt.SetFrameTitle("My Front Page")
// Retrieve the published posts.
hdrs, err := database.AmGetPublishedPosts(ctxt.Ctx())
@@ -281,7 +281,7 @@ func TopPage(ctxt ui.AmContext) (string, any) {
*/
func AboutPage(ctxt ui.AmContext) (string, any) {
// Set the page title.
ctxt.VarMap().Set("amsterdam_pageTitle", "About Amsterdam")
ctxt.SetFrameTitle("About Amsterdam")
return "framed", "about.jet"
}