diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 19:15:43 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 19:15:43 +0200 |
| commit | 412a77b7c1ba1819f4bf1c0697ddd19d7af21e19 (patch) | |
| tree | 911f3b54bc4bf05f7cfb819c31a08219e7b5ac59 /backend/logs.go | |
| parent | 2aedff3d2bbdcad93d6ca0ec883c446c703cafaa (diff) | |
fix(frontend): malformed title and quote after hot update
Diffstat (limited to 'backend/logs.go')
| -rw-r--r-- | backend/logs.go | 10 |
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() |
