aboutsummaryrefslogtreecommitdiff
path: root/backend/data.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-05 22:40:28 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-05 22:40:28 +0200
commit33cfc1d4e8f3b5b55202588e5b5148a48b43d427 (patch)
tree8163aebcb5d3844e30b71b84b17934e38f618217 /backend/data.go
parente9713ae0fe2fd5f714fc73a46adfb5810899a05c (diff)
refactor(backend): generalize file parsing
Diffstat (limited to 'backend/data.go')
-rw-r--r--backend/data.go24
1 files changed, 12 insertions, 12 deletions
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