about summary refs log tree commit diff stats
path: root/internal/config/config.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-12 21:44:57 +0200
committerAlan Pearce2024-05-12 21:44:57 +0200
commit7077a3748fa545e8dee83d4f3464c55b4b459183 (patch)
tree2e6fda93ba9a1a81ea23bd2b4902f6abbbe2e478 /internal/config/config.go
parentfe79b4509dd580542fa28186673826df603677bb (diff)
downloadsearchix-7077a3748fa545e8dee83d4f3464c55b4b459183.tar.lz
searchix-7077a3748fa545e8dee83d4f3464c55b4b459183.tar.zst
searchix-7077a3748fa545e8dee83d4f3464c55b4b459183.zip
feat: allow adding extra HTML to the body via configuration
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 9880b3a..71b56be 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -1,6 +1,7 @@
 package config
 
 import (
+	"html/template"
 	"log/slog"
 	"maps"
 	"net/url"
@@ -27,10 +28,11 @@ func (u *URL) UnmarshalText(text []byte) (err error) {
 }
 
 type Config struct {
-	DataPath string `toml:"data-path"`
-	CSP      CSP    `toml:"content-security-policy"`
-	Headers  map[string]string
-	Sources  map[string]*importer.Source
+	DataPath      string        `toml:"data-path"`
+	CSP           CSP           `toml:"content-security-policy"`
+	ExtraBodyHTML template.HTML `toml:"extra-body-html"`
+	Headers       map[string]string
+	Sources       map[string]*importer.Source
 }
 
 var defaultConfig = Config{