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