diff options
| author | William Hergès <william@herges.fr> | 2025-10-05 15:16:20 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-10-05 15:16:20 +0200 |
| commit | fa5ac4040e8e2fc57bef5c598e1ceda4c2fc0a73 (patch) | |
| tree | 5dbbba0ec6101fb666ee88a977a21ef95d55a2e9 /backend/config.go | |
| parent | 5d6198f168dd1a8598048718d149d1171df09c1a (diff) | |
feat(backend): add noreferer on external link and move target blank
Diffstat (limited to 'backend/config.go')
| -rw-r--r-- | backend/config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/config.go b/backend/config.go index 8c111ae..d6cf25a 100644 --- a/backend/config.go +++ b/backend/config.go @@ -1,9 +1,11 @@ package backend import ( + "html/template" "log/slog" "os" + "git.anhgelus.world/anhgelus/small-world/markdown" "github.com/pelletier/go-toml/v2" ) @@ -12,6 +14,10 @@ type Link struct { URL string `toml:"url"` } +func (l *Link) Render() template.HTML { + return markdown.RenderLink(l.Name, l.URL) +} + type Logo struct { Header string `toml:"header"` Favicon string `toml:"favicon"` |
