Add site description to home page

This commit is contained in:
ChaoticByte 2024-08-29 13:29:39 +02:00
parent b86b1688ea
commit 1db5336f35
No known key found for this signature in database
6 changed files with 24 additions and 5 deletions

14
main.go
View file

@ -16,10 +16,11 @@ var appTemplate *template.Template = template.New("app")
var db Database
type TemplateData struct {
TOC []string
Entry string
Title string
SiteDescription string
TOC []string
EntryTitle string
Entry string
Footer []template.HTML
}
@ -42,7 +43,14 @@ func handleApplication(w http.ResponseWriter, req *http.Request) {
}
err = appTemplate.ExecuteTemplate(
w, "app",
TemplateData{TOC: db.Keys, Entry: entry, Title: MainTitle, EntryTitle: entryName, Footer: FooterContent})
TemplateData{
TOC: db.Keys,
Entry: entry,
Title: MainTitle,
EntryTitle: entryName,
Footer: FooterContent,
SiteDescription: SiteDescription,
})
if err != nil { logger.Println(err) }
}