set title
This commit is contained in:
parent
2e60b84c83
commit
1ce5f37fc4
2 changed files with 5 additions and 1 deletions
|
|
@ -40,6 +40,9 @@ func ConfigurableRootPage(ctx *h.RequestContext, props RootPageProps) *h.Page {
|
||||||
h.Head(
|
h.Head(
|
||||||
h.Meta("viewport", "width=device-width, initial-scale=1"),
|
h.Meta("viewport", "width=device-width, initial-scale=1"),
|
||||||
h.Meta("title", title),
|
h.Meta("title", title),
|
||||||
|
h.Title(
|
||||||
|
h.Text(title),
|
||||||
|
),
|
||||||
h.Link("/public/favicon.ico", "icon"),
|
h.Link("/public/favicon.ico", "icon"),
|
||||||
h.Link("/public/apple-touch-icon.png", "apple-touch-icon"),
|
h.Link("/public/apple-touch-icon.png", "apple-touch-icon"),
|
||||||
h.Meta("charset", "utf-8"),
|
h.Meta("charset", "utf-8"),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package docs
|
package docs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"github.com/maddalax/htmgo/framework/h"
|
"github.com/maddalax/htmgo/framework/h"
|
||||||
"htmgo-site/pages/base"
|
"htmgo-site/pages/base"
|
||||||
"htmgo-site/partials"
|
"htmgo-site/partials"
|
||||||
|
|
@ -116,7 +117,7 @@ func DocPage(ctx *h.RequestContext, children ...h.Ren) *h.Page {
|
||||||
for _, section := range sections {
|
for _, section := range sections {
|
||||||
for _, page := range section.Pages {
|
for _, page := range section.Pages {
|
||||||
if page.Path == ctx.Request.URL.Path {
|
if page.Path == ctx.Request.URL.Path {
|
||||||
title = page.Title
|
title = fmt.Sprintf("Docs - %s", page.Title)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue