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