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