From fc5fd2edd9b8282497e33a18300eab694d8a89c6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 21 Jun 2024 13:02:08 +0200 Subject: refactor: switch to templ for HTML templates --- internal/config/structs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/config/structs.go') diff --git a/internal/config/structs.go b/internal/config/structs.go index 70283f2..6c6bc13 100644 --- a/internal/config/structs.go +++ b/internal/config/structs.go @@ -4,7 +4,6 @@ package config // keep config structs here so that lll ignores the long lines (go doesn't support multi-line struct tags) import ( - "html/template" "log/slog" ) @@ -22,7 +21,7 @@ type Web struct { BaseURL URL `comment:"Absolute URL to this instance, useful if behind a reverse proxy"` SentryDSN string `comment:"If set, will send server errors to Sentry"` Environment string `comment:"Affects logging parameters. One of 'development' or 'production'"` - ExtraHeadHTML template.HTML `comment:"Content to add to HTML . Can be used to override styling, add scripts, etc."` + ExtraHeadHTML string `comment:"Content to add to HTML . Can be used to override styling, add scripts, etc."` Headers map[string]string `comment:"Extra headers to send with HTTP requests"` } @@ -35,6 +34,7 @@ type Importer struct { type Source struct { Name string `comment:"Human-readable name of source for generating links"` + Order uint `comment:"Order in which to show source in web interface."` Key string `comment:"Machine-readable name of source. Must be URL- and path-safe."` Enable bool `comment:"Controls whether to show in the web interface and to run fetch/import jobs."` Fetcher Fetcher `comment:"How to fetch options.json. One of 'channel', 'channel-nixpkgs' or 'download'."` -- cgit 1.4.1