diff options
| author | William Hergès <william@herges.fr> | 2026-01-02 18:09:55 +0100 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2026-01-02 18:10:04 +0100 |
| commit | 7d4ec713ba76d7e787c9d787a38a96b81daf52dc (patch) | |
| tree | 0d0199d5b11a503dad236f9c9571ac04b819beb8 | |
| parent | 2e16b351cd53c9d732eafa4eec3e4c8568853f1b (diff) | |
feat(backend): specify title name of section entry in config
| -rw-r--r-- | backend/config.go | 1 | ||||
| -rw-r--r-- | backend/section.go | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/backend/config.go b/backend/config.go index f99c6f6..d4872b1 100644 --- a/backend/config.go +++ b/backend/config.go @@ -69,6 +69,7 @@ func (c *Config) DefaultValues() { } c.Sections = []Section{{ Name: "logs", + TitleName: "log", Description: "Aut maxime voluptatibus ut dicta voluptates et ut alias. Sunt et incidunt similique et doloremque nostrum fugit autem. Ut omnis quo nisi. Accusantium voluptas fugit autem maiores numquam doloribus.", Folder: "data/logs", URI: "logs", diff --git a/backend/section.go b/backend/section.go index 5bbf558..2e0c520 100644 --- a/backend/section.go +++ b/backend/section.go @@ -25,6 +25,7 @@ var ( type Section struct { Name string `toml:"name"` + TitleName string `toml:"title_name"` Folder string `toml:"folder"` Description string `toml:"description"` URI string `toml:"uri"` @@ -204,7 +205,7 @@ func (s *Section) handleOne(w http.ResponseWriter, r *http.Request) { return } } - d.section = s.Name[:len(s.Name)-1] + d.section = s.TitleName d.handleGeneric(w, r, "data", d) } |
