diff options
| author | Patrick Spek <p.spek@tyil.nl> | 2025-12-09 20:21:51 +0100 |
|---|---|---|
| committer | Patrick Spek <p.spek@tyil.nl> | 2025-12-09 20:21:51 +0100 |
| commit | 95e35a12da04279a913b3252e68639020c7a04a5 (patch) | |
| tree | 4d023b384aaa2b41273cbac659ab174a0a0a0067 | |
| parent | d80651369240894861eab1e68ae782e3101e3917 (diff) | |
| download | dashlab-95e35a12da04279a913b3252e68639020c7a04a5.tar.gz dashlab-95e35a12da04279a913b3252e68639020c7a04a5.tar.bz2 | |
Expand example config.yaml with all possible keys
| -rw-r--r-- | config.yaml | 80 | ||||
| -rw-r--r-- | config/struct.go | 11 |
2 files changed, 82 insertions, 9 deletions
diff --git a/config.yaml b/config.yaml index 7192493..ba455ab 100644 --- a/config.yaml +++ b/config.yaml @@ -1,9 +1,66 @@ -title: Dashlab -announcement: The admin has yet to write their own configuration file! +# The title displayed at the top of the dashboard. +title: DashLab + +server: + # The address and port to start listening on. + address: 0.0.0.0 + port: 8080 + +# An announcement to show to all visitors. Set to an empty string to disable. +announcement: | + The admin has yet to write their own configuration file! + +defaults: + # Set the default icon set and name to fall back to if no icon could be found + # automatically. + icon-set: "simple-icons" + icon-name: "simpleicons" + +# Configure how to check for authentication. auth: - http-header: "X-Authentik-Username" + # The name of the HTTP header to read the username from. + user-header: "X-Authentik-Username" + + # The name of the HTTP header to read group memberships from. + groups-header: "X-Authentik-Groups" + + # The string to use as seperator for the group membership entries from the + # groups-header. separator: "|" +# Configure the style of the dashboard. +style: + fonts: + primary: "sans-serif" + header: "sans-serif" + footer: "sans-serif" + tags: "sans-serif" + colors: + text-primary: "#f7f7f7" + text-secondary: "#aaaaaa" + text-link: "#0097fc" + text-announcement: "#000000" + background-primary: "#333333" + background-secondary: "#555555" + background-announcement: "#ffff90" + tags: + # Specify dedicated background and text colors per tag. + # TagName: + # background: "" + # text: "" + transformations: + link-brightness-hover: 0.7 + link-brightness-active: 0.3 + icon-filter: "grayscale(1) brightness(0)" + icon-size: 48px + +# Reload the configuration file on every request. This makes performance +# much worse, but allows for quick save-and-inspect changes of your +# configuration file. +# reload-middleware: false + +# A list of all different sections. Each section has a heading, optionally a +# description, and 1 or more apps to show. sections: - title: Example description: This section exists solely as an example @@ -11,3 +68,20 @@ sections: - title: DashLab description: A link to itself url: / + # An optional icon to show for this application. If not set, the shipped + # icon sets will be checked for an icon that matches the title of this + # application. The url attribute can be used to simply link to an icon + # elsewhere on the Internet. Otherwise, you can use the set attribute to + # select the icon set to pick from, and name to specify the icon filename. + # icon: + # url: "" + # set: "" + # name: "" + # A set of tags to show next to the application title. + # tags: + # - TagName + # Specify the groups which should be able to see this application. If left + # empty, everyone can see it. + # groups: + # - admin + # - moderator diff --git a/config/struct.go b/config/struct.go index 67415df..dca3cf3 100644 --- a/config/struct.go +++ b/config/struct.go @@ -21,10 +21,9 @@ type ConfigApp struct { } type ConfigAppIcon struct { - Url string - Set string - Name string - Color string + Url string + Set string + Name string } type ConfigAuth struct { @@ -34,8 +33,8 @@ type ConfigAuth struct { } type ConfigDefaults struct { - IconSet string - IconName string + IconSet string `yaml:"icon-set"` + IconName string `yaml:"icon-name"` } type ConfigSection struct { |
