make blogname and blogdir available both to index as well as individual post pages

This commit is contained in:
gutmet 2020-11-27 19:04:18 +01:00
parent 53f0d92176
commit 748ebaed8e

View File

@ -67,6 +67,7 @@ func emitPostPage(post Post) string {
os.MkdirAll(folders, 0755)
page := Page{}
page.Blogname = blogname
page.Blogdir = folder
page.Title = post.Meta.Title
page.Style = style
page.Content = post.Content
@ -114,6 +115,7 @@ func emitIndexPage(i int, posts []Post, total int) {
page.Title = blogname
page.Style = style
page.Blogdir = folder
page.Blogname = blogname
page.Blogpost = false
page.PostCollection = postCollection
if indexPageExists(i-1, total) {