Skip to content

Commit

Permalink
add title tag to starter template
Browse files Browse the repository at this point in the history
  • Loading branch information
maddalax committed Oct 30, 2024
1 parent 1ce5f37 commit 965a848
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions templates/starter/pages/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,31 @@ import (
)

func RootPage(children ...h.Ren) *h.Page {
title := "htmgo template"
description := "an example of the htmgo template"
author := "htmgo"
url := "https://htmgo.dev"

return h.NewPage(
h.Html(
h.HxExtensions(
h.BaseExtensions(),
),
h.Head(
h.Title(
h.Text(title),
),
h.Meta("viewport", "width=device-width, initial-scale=1"),
h.Link("/public/favicon.ico", "icon"),
h.Link("/public/apple-touch-icon.png", "apple-touch-icon"),
h.Meta("title", "htmgo template"),
h.Meta("title", title),
h.Meta("charset", "utf-8"),
h.Meta("author", "htmgo"),
h.Meta("description", "this is a template"),
h.Meta("og:title", "htmgo template"),
h.Meta("og:url", "https://htmgo.dev"),
h.Link("canonical", "https://htmgo.dev"),
h.Meta("og:description", "this is a template"),
h.Meta("author", author),
h.Meta("description", description),
h.Meta("og:title", title),
h.Meta("og:url", url),
h.Link("canonical", url),
h.Meta("og:description", description),
h.Link("/public/main.css", "stylesheet"),
h.Script("/public/htmgo.js"),
),
Expand Down

0 comments on commit 965a848

Please sign in to comment.