From 1ce5f37fc4a5f00cab967369b281f37d626c432a Mon Sep 17 00:00:00 2001 From: maddalax Date: Wed, 30 Oct 2024 13:39:07 -0500 Subject: [PATCH] set title --- htmgo-site/pages/base/root.go | 3 +++ htmgo-site/pages/docs/base.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htmgo-site/pages/base/root.go b/htmgo-site/pages/base/root.go index c3f7edf..a522438 100644 --- a/htmgo-site/pages/base/root.go +++ b/htmgo-site/pages/base/root.go @@ -40,6 +40,9 @@ func ConfigurableRootPage(ctx *h.RequestContext, props RootPageProps) *h.Page { h.Head( h.Meta("viewport", "width=device-width, initial-scale=1"), h.Meta("title", title), + h.Title( + h.Text(title), + ), h.Link("/public/favicon.ico", "icon"), h.Link("/public/apple-touch-icon.png", "apple-touch-icon"), h.Meta("charset", "utf-8"), diff --git a/htmgo-site/pages/docs/base.go b/htmgo-site/pages/docs/base.go index 7eaa5af..683a6db 100644 --- a/htmgo-site/pages/docs/base.go +++ b/htmgo-site/pages/docs/base.go @@ -1,6 +1,7 @@ package docs import ( + "fmt" "github.com/maddalax/htmgo/framework/h" "htmgo-site/pages/base" "htmgo-site/partials" @@ -116,7 +117,7 @@ func DocPage(ctx *h.RequestContext, children ...h.Ren) *h.Page { for _, section := range sections { for _, page := range section.Pages { if page.Path == ctx.Request.URL.Path { - title = page.Title + title = fmt.Sprintf("Docs - %s", page.Title) break } }