]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - docs/configuration.md
Fix #121 - Change default theme and layout from config
[github/bastienwirtz/homer.git] / docs / configuration.md
CommitLineData
1d3287dc 1# Configuration
1bc75494 2
2662b170 3Title, icons, links, colors, and services can be configured in the `config.yml` file (located in `/assets` directory once built, or in the `public/assets` directory in development mode), using [yaml](http://yaml.org/) format.
1bc75494
BW
4
5```yaml
6---
7# Homepage configuration
8# See https://fontawesome.com/icons for icons options
9
fd12de9e 10# Optional: Use external configuration file.
1bc75494
BW
11# Using this will ignore remaining config in this file
12# externalConfig: https://example.com/server-luci/config.yaml
13
14title: "App dashboard"
15subtitle: "Homer"
a02961b7 16# documentTitle: "Welcome" # Customize the browser tab text
ffe3404a 17logo: "assets/logo.png"
1bc75494
BW
18# Alternatively a fa icon can be provided:
19# icon: "fas fa-skull-crossbones"
20
21header: true # Set to false to hide the header
22footer: '<p>Created with <span class="has-text-danger">❤️</span> with <a href="https://bulma.io/">bulma</a>, <a href="https://vuejs.org/">vuejs</a> & <a href="https://fontawesome.com/">font awesome</a> // Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fab fa-github-alt"></i></a></p>' # set false if you want to hide it.
23
24columns: "3" # "auto" or number (must be a factor of 12: 1, 2, 3, 4, 6, 12)
25connectivityCheck: true # whether you want to display a message when the apps are not accessible anymore (VPN disconnected for example)
26
fea0f090
BW
27# Optional: Proxy / hosting option
28proxy:
66a434e7
BW
29 # NOT All custom services implements this new option YET. Support will be extended very soon.
30 useCredentials: false # send cookies & authorization headers when fetching service specific data. Set to `true` if you use an authentication proxy. Can be overrided on service level.
fea0f090 31
5db2414d
A
32# Set the default layout and color scheme
33defaults:
34 layout: columns # Either 'columns', or 'list'
35 colorTheme: auto # One of 'auto', 'light', or 'dark'
36
1bc75494 37# Optional theming
86f4680a 38theme: default # 'default' or one of the themes available in 'src/assets/themes'.
1bc75494 39
71cf63eb 40# Optional custom stylesheet
8e5ee54a
GC
41# Will load custom CSS files. Especially useful for custom icon sets.
42# stylesheet:
43# - "assets/custom.css"
71cf63eb 44
86f4680a 45# Here is the exhaustive list of customization parameters
1bc75494
BW
46# However all value are optional and will fallback to default if not set.
47# if you want to change only some of the colors, feel free to remove all unused key.
48colors:
49 light:
50 highlight-primary: "#3367d6"
51 highlight-secondary: "#4285f4"
52 highlight-hover: "#5a95f5"
53 background: "#f5f5f5"
54 card-background: "#ffffff"
55 text: "#363636"
56 text-header: "#424242"
57 text-title: "#303030"
58 text-subtitle: "#424242"
59 card-shadow: rgba(0, 0, 0, 0.1)
3faeac7e 60 link: "#3273dc"
1bc75494 61 link-hover: "#363636"
154e6efe 62 background-image: "assets/your/light/bg.png"
1bc75494
BW
63 dark:
64 highlight-primary: "#3367d6"
65 highlight-secondary: "#4285f4"
66 highlight-hover: "#5a95f5"
67 background: "#131313"
68 card-background: "#2b2b2b"
69 text: "#eaeaea"
70 text-header: "#ffffff"
71 text-title: "#fafafa"
72 text-subtitle: "#f5f5f5"
73 card-shadow: rgba(0, 0, 0, 0.4)
3faeac7e 74 link: "#3273dc"
1bc75494 75 link-hover: "#ffdd57"
154e6efe 76 background-image: "assets/your/dark/bg.png"
1bc75494
BW
77
78# Optional message
79message:
80 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
6d29bc27 81 # mapping: # allows to map fields from the remote format to the one expected by Homer
82 # title: 'id' # use value from field 'id' as title
83 # content: 'value' # value from field 'value' as content
9542de6e 84 # refreshInterval: 10000 # Optional: time interval to refresh message
6d29bc27 85 #
86 # Real example using chucknorris.io for showing Chuck Norris facts as messages:
87 # url: https://api.chucknorris.io/jokes/random
88 # mapping:
89 # title: 'id'
90 # content: 'value'
1ddf3941 91 # refreshInterval: 10000
1bc75494
BW
92 style: "is-warning"
93 title: "Optional message!"
0e045b4c 94 icon: "fa fa-exclamation-triangle"
1bc75494
BW
95 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
96
97# Optional navbar
98# links: [] # Allows for navbar (dark mode, layout, and search) without any links
99links:
100 - name: "Link 1"
101 icon: "fab fa-github"
102 url: "https://github.com/bastienwirtz/homer"
103 target: "_blank" # optional html tag target attribute
104 - name: "link 2"
105 icon: "fas fa-book"
106 url: "https://github.com/bastienwirtz/homer"
e3bd2ecc 107 # this will link to a second homer page that will load config from page2.yml and keep default config values as in config.yml file
108 # see url field and assets/page.yml used in this example:
109 - name: "Second Page"
110 icon: "fas fa-file-alt"
c6267296 111 url: "#page2"
1bc75494
BW
112
113# Services
86f4680a 114# First level array represents a group.
1bc75494
BW
115# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
116services:
117 - name: "Application"
62ec6fa0 118 icon: "fas fa-code-branch"
8e093313
GC
119 # A path to an image can also be provided. Note that icon take precedence if both icon and logo are set.
120 # logo: "path/to/logo"
1bc75494
BW
121 items:
122 - name: "Awesome app"
123 logo: "assets/tools/sample.png"
124 # Alternatively a fa icon can be provided:
125 # icon: "fab fa-jenkins"
126 subtitle: "Bookmark example"
127 tag: "app"
128 url: "https://www.reddit.com/r/selfhosted/"
129 target: "_blank" # optional html tag target attribute
130 - name: "Another one"
131 logo: "assets/tools/sample2.png"
132 subtitle: "Another application"
133 tag: "app"
134 # Optional tagstyle
135 tagstyle: "is-success"
136 url: "#"
137 - name: "Other group"
138 icon: "fas fa-heartbeat"
139 items:
9a14de00 140 - name: "Pi-hole"
1bc75494 141 logo: "assets/tools/sample.png"
c5eab80d 142 # subtitle: "Network-wide Ad Blocking" # optional, if no subtitle is defined, PiHole statistics will be shown
1bc75494 143 tag: "other"
9a14de00
BW
144 url: "http://192.168.0.151/admin"
145 type: "PiHole" # optional, loads a specific component that provides extra features. MUST MATCH a file name (without file extension) available in `src/components/services`
e9afa4d7
TP
146 target: "_blank" # optional html a tag target attribute
147 # class: "green" # optional custom CSS class for card, useful with custom stylesheet
be308259 148 # background: red # optional color for card to set color directly without custom stylesheet
1bc75494
BW
149```
150
9e0ef05e 151View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them.
fd12de9e 152
9542de6e 153If you choose to fetch message information from an endpoint, the output format should be as follows (or you can [custom map fields as shown in tips-and-tricks](./tips-and-tricks.md#mapping-fields)):
1bc75494
BW
154
155```json
156{
157 "style": null,
158 "title": "Lorem ipsum 42",
159 "content": "LA LA LA Lorem ipsum dolor sit amet, ....."
160}
161```
162
163`null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
164Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
165
1d3287dc 166## Style Options
1bc75494
BW
167
168Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](https://bulma.io/documentation/modifiers/syntax/). You'll notice in the config there is a `tagstyle` option. It can be set to any of the bulma modifiers. You'll probably want to use one of these 4 main colors:
169
170- `is-info` (blue)
171- `is-success` (green)
172- `is-warning` (yellow)
173- `is-danger` (red)
174
175You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.
d1b9dea2 176
1d3287dc 177## PWA Icons
d1b9dea2
BW
178
179In order to easily generate all required icon preset for the PWA to work, a tool like [vue-pwa-asset-generator](https://www.npmjs.com/package/vue-pwa-asset-generator) can be used:
180
181```bash
182npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder}
183```
c3878bca 184
1d3287dc 185## Supported services
c3878bca
AW
186
187Currently the following services are supported for showing quick infos on the card. They can be used by setting the type to one of the following values at the item.
188
189- PiHole
190- AdGuardHome
191- PaperlessNG
192- Mealie
193
1d3287dc
BW
194## Additional configuration
195
196### Paperless
c3878bca 197
c3878bca
AW
198For Paperless you need an API-Key which you have to store at the item in the field `apikey`.
199
1d3287dc
BW
200### Mealie
201
4386cd09 202First off make sure to remove an existing `subtitle` as it will take precedence if set. Setting `type: "Mealie"` will then show the number of recipes Mealie is keeping organized or the planned meal for today if one is planned. You will have to set an API key in the field `apikey` which can be created in your Mealie installation.