diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-02 22:35:58 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-02 22:35:58 +0200 |
| commit | 6044dd841c81f0f4d206c6c8800b0fd30320cf13 (patch) | |
| tree | 7498d483e661e0c87d3af2f7ab03eacda48fe30b /backend/logs.go | |
| parent | 5dfd71bfe1c0e25da413f00256a302b13c88d26d (diff) | |
feat(backend): display list of logs in home
Diffstat (limited to 'backend/logs.go')
| -rw-r--r-- | backend/logs.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/logs.go b/backend/logs.go index d15be41..ef44e0a 100644 --- a/backend/logs.go +++ b/backend/logs.go @@ -27,6 +27,7 @@ type logData struct { Img image `toml:"image"` pubDate toml.LocalDate `toml:"publication_date"` Content template.HTML `toml:"-"` + Slug string `toml:"-"` } func (d *logData) SetData(dt *data) { @@ -136,6 +137,7 @@ func parseLog(d *logData, path, slug string) bool { d.Article = true d.LogTitle = slug d.title = slug + d.Slug = slug b, err := os.ReadFile(path + ".md") if err != nil { if os.IsNotExist(err) { |
