From 7d4ec713ba76d7e787c9d787a38a96b81daf52dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 2 Jan 2026 18:09:55 +0100 Subject: feat(backend): specify title name of section entry in config --- backend/config.go | 1 + backend/section.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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) } -- cgit v1.2.3