aboutsummaryrefslogtreecommitdiff
path: root/backend/logs.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/logs.go')
-rw-r--r--backend/logs.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/backend/logs.go b/backend/logs.go
index 81e6f77..86e0221 100644
--- a/backend/logs.go
+++ b/backend/logs.go
@@ -23,8 +23,9 @@ var (
type logData struct {
*data
EntryInfo
- Content template.HTML `toml:"-"`
- Slug string `toml:"-"`
+ LogTitle string
+ Content template.HTML
+ Slug string
}
func (d *logData) SetData(dt *data) {
@@ -35,6 +36,10 @@ func (d *logData) PubDate() string {
return d.PubLocalDate.String()
}
+func (d *logData) Title() string {
+ return d.data.Title()
+}
+
type image struct {
Src string `toml:"src"`
Alt string `toml:"alt"`
@@ -157,6 +162,7 @@ func parseLog(d *logData, mu *sync.Mutex, path, slug string) bool {
if !ok {
return false
}
+ d.LogTitle = d.EntryInfo.Title
mu.Lock()
logs[path] = d
mu.Unlock()