Skip to content

A self-hosted dashboard that puts all your feeds in one place

Merge latest changes

Svilen Markov0651a2886e1a
diff --cc docs/configuration.md
index 26a0953,15d9eac..cb8d924
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@@ -32,9 -32,9 +32,10 @@@
- [Twitch Top Games](#twitch-top-games)
- [iframe](#iframe)
- [HTML](#html)
+ - [Docker](#docker)
## Intro
+ <!-- TODO: update -->
Configuration is done via a single YAML file and a server restart is required in order for any changes to take effect. Trying to start the server with an invalid config file will result in an error.
## Preconfigured page
diff --cc internal/glance/config-fields.go
index 47072bb,527dfe2..130cfce
--- a/internal/glance/config-fields.go
+++ b/internal/glance/config-fields.go
@@@ -185,10 -180,15 +180,15 @@@ type customIconField struct
// invert the color based on the theme being light or dark
}
- func (i *CustomIcon) FromURL(url string) error {
- prefix, icon, found := strings.Cut(url, ":")
+ func (i *customIconField) UnmarshalYAML(node *yaml.Node) error {
+ var value string
+ if err := node.Decode(&value); err != nil {
+ return err
+ }
+
+ prefix, icon, found := strings.Cut(value, ":")
if !found {
- i.URL = value
+ i.URL = url
return nil
}
diff --cc internal/glance/templates/docker.html
index e623712,0000000..e623712
mode 100644,000000..100644
--- a/internal/glance/templates/docker.html
+++ b/internal/glance/templates/docker.html
diff --cc internal/glance/widget.go
index 9758699,81cb39c..a5d756f
--- a/internal/glance/widget.go
+++ b/internal/glance/widget.go
@@@ -24,55 -22,53 +22,55 @@@ func newWidget(widgetType string) (widg
switch widgetType {
case "calendar":
- widget = &Calendar{}
+ w = &calendarWidget{}
case "clock":
- widget = &Clock{}
+ w = &clockWidget{}
case "weather":
- widget = &Weather{}
+ w = &weatherWidget{}
case "bookmarks":
- widget = &Bookmarks{}
+ w = &bookmarksWidget{}
case "iframe":
- widget = &IFrame{}
+ w = &iframeWidget{}
case "html":
- widget = &HTML{}
+ w = &htmlWidget{}
case "hacker-news":
- widget = &HackerNews{}
+ w = &hackerNewsWidget{}
case "releases":
- widget = &Releases{}
+ w = &releasesWidget{}
case "videos":
- widget = &Videos{}
+ w = &videosWidget{}
case "markets", "stocks":
- widget = &Markets{}
+ w = &marketsWidget{}
case "reddit":
- widget = &Reddit{}
+ w = &redditWidget{}
case "rss":
- widget = &RSS{}
+ w = &rssWidget{}
case "monitor":
- widget = &Monitor{}
+ w = &monitorWidget{}
case "twitch-top-games":
- widget = &TwitchGames{}
+ w = &twitchGamesWidget{}
case "twitch-channels":
- widget = &TwitchChannels{}
+ w = &twitchChannelsWidget{}
case "lobsters":
- widget = &Lobsters{}
+ w = &lobstersWidget{}
case "change-detection":
- widget = &ChangeDetection{}
+ w = &changeDetectionWidget{}
case "repository":
- widget = &Repository{}
+ w = &repositoryWidget{}
case "search":
- widget = &Search{}
+ w = &searchWidget{}
case "extension":
- widget = &Extension{}
+ w = &extensionWidget{}
case "group":
- widget = &Group{}
+ w = &groupWidget{}
case "dns-stats":
- widget = &DNSStats{}
+ w = &dnsStatsWidget{}
case "split-column":
- widget = &SplitColumn{}
+ w = &splitColumnWidget{}
case "custom-api":
- widget = &CustomApi{}
+ w = &customAPIWidget{}
+ case "docker":
- widget = &Docker{}
++ w = &dockerContainersWidget{}
default:
return nil, fmt.Errorf("unknown widget type: %s", widgetType)
}