From 412a77b7c1ba1819f4bf1c0697ddd19d7af21e19 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Mon, 6 Oct 2025 19:15:43 +0200 Subject: fix(frontend): malformed title and quote after hot update --- backend/logs.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'backend/logs.go') 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() -- cgit v1.2.3