From 33cfc1d4e8f3b5b55202588e5b5148a48b43d427 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sun, 5 Oct 2025 22:40:28 +0200 Subject: refactor(backend): generalize file parsing --- backend/data.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'backend/data.go') diff --git a/backend/data.go b/backend/data.go index d98c8b0..bc3136c 100644 --- a/backend/data.go +++ b/backend/data.go @@ -24,16 +24,16 @@ type dataUsable interface { } type data struct { - title string - Article bool - Domain string - URL string - Image string - Description string - Name string - Links []Link - Logo *Logo - Quote string + title string + Article bool + Domain string + URL string + Image string + PageDescription string + Name string + Links []Link + Logo *Logo + Quote string } func (d *data) SetData(data *data) { @@ -48,8 +48,8 @@ func (d *data) handleGeneric(w http.ResponseWriter, r *http.Request, name string if d.Name == "" { d.Name = cfg.Name } - if d.Description == "" { - d.Description = cfg.Description + if d.PageDescription == "" { + d.PageDescription = cfg.Description } if d.Links == nil { d.Links = cfg.Links -- cgit v1.2.3