]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - docs/configuration.md
Fixes identations and link docs.
[github/bastienwirtz/homer.git] / docs / configuration.md
CommitLineData
1bc75494
BW
1## Configuration
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
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
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
27# Optional theming
86f4680a 28theme: default # 'default' or one of the themes available in 'src/assets/themes'.
1bc75494 29
71cf63eb 30# Optional custom stylesheet
8e5ee54a
GC
31# Will load custom CSS files. Especially useful for custom icon sets.
32# stylesheet:
33# - "assets/custom.css"
71cf63eb 34
86f4680a 35# Here is the exhaustive list of customization parameters
1bc75494
BW
36# However all value are optional and will fallback to default if not set.
37# if you want to change only some of the colors, feel free to remove all unused key.
38colors:
39 light:
40 highlight-primary: "#3367d6"
41 highlight-secondary: "#4285f4"
42 highlight-hover: "#5a95f5"
43 background: "#f5f5f5"
44 card-background: "#ffffff"
45 text: "#363636"
46 text-header: "#424242"
47 text-title: "#303030"
48 text-subtitle: "#424242"
49 card-shadow: rgba(0, 0, 0, 0.1)
50 link-hover: "#363636"
154e6efe 51 background-image: "assets/your/light/bg.png"
1bc75494
BW
52 dark:
53 highlight-primary: "#3367d6"
54 highlight-secondary: "#4285f4"
55 highlight-hover: "#5a95f5"
56 background: "#131313"
57 card-background: "#2b2b2b"
58 text: "#eaeaea"
59 text-header: "#ffffff"
60 text-title: "#fafafa"
61 text-subtitle: "#f5f5f5"
62 card-shadow: rgba(0, 0, 0, 0.4)
63 link-hover: "#ffdd57"
154e6efe 64 background-image: "assets/your/dark/bg.png"
1bc75494
BW
65
66# Optional message
67message:
68 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
6d29bc27 69 # mapping: # allows to map fields from the remote format to the one expected by Homer
70 # title: 'id' # use value from field 'id' as title
71 # content: 'value' # value from field 'value' as content
9542de6e 72 # refreshInterval: 10000 # Optional: time interval to refresh message
6d29bc27 73 #
74 # Real example using chucknorris.io for showing Chuck Norris facts as messages:
75 # url: https://api.chucknorris.io/jokes/random
76 # mapping:
77 # title: 'id'
78 # content: 'value'
1ddf3941 79 # refreshInterval: 10000
1bc75494
BW
80 style: "is-warning"
81 title: "Optional message!"
0e045b4c 82 icon: "fa fa-exclamation-triangle"
1bc75494
BW
83 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
84
85# Optional navbar
86# links: [] # Allows for navbar (dark mode, layout, and search) without any links
87links:
88 - name: "Link 1"
89 icon: "fab fa-github"
90 url: "https://github.com/bastienwirtz/homer"
91 target: "_blank" # optional html tag target attribute
92 - name: "link 2"
93 icon: "fas fa-book"
94 url: "https://github.com/bastienwirtz/homer"
95
96# Services
86f4680a 97# First level array represents a group.
1bc75494
BW
98# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
99services:
100 - name: "Application"
62ec6fa0 101 icon: "fas fa-code-branch"
1bc75494
BW
102 items:
103 - name: "Awesome app"
104 logo: "assets/tools/sample.png"
105 # Alternatively a fa icon can be provided:
106 # icon: "fab fa-jenkins"
107 subtitle: "Bookmark example"
108 tag: "app"
109 url: "https://www.reddit.com/r/selfhosted/"
110 target: "_blank" # optional html tag target attribute
111 - name: "Another one"
112 logo: "assets/tools/sample2.png"
113 subtitle: "Another application"
114 tag: "app"
115 # Optional tagstyle
116 tagstyle: "is-success"
117 url: "#"
118 - name: "Other group"
119 icon: "fas fa-heartbeat"
120 items:
9a14de00 121 - name: "Pi-hole"
1bc75494 122 logo: "assets/tools/sample.png"
c5eab80d 123 # subtitle: "Network-wide Ad Blocking" # optional, if no subtitle is defined, PiHole statistics will be shown
1bc75494 124 tag: "other"
9a14de00
BW
125 url: "http://192.168.0.151/admin"
126 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
127 target: "_blank" # optional html a tag target attribute
128 # class: "green" # optional custom CSS class for card, useful with custom stylesheet
be308259 129 # background: red # optional color for card to set color directly without custom stylesheet
1bc75494
BW
130```
131
9542de6e 132If 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
133
134```json
135{
136 "style": null,
137 "title": "Lorem ipsum 42",
138 "content": "LA LA LA Lorem ipsum dolor sit amet, ....."
139}
140```
141
142`null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
143Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
144
145### Style Options
146
147Homer 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:
148
149- `is-info` (blue)
150- `is-success` (green)
151- `is-warning` (yellow)
152- `is-danger` (red)
153
154You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.
d1b9dea2
BW
155
156### PWA Icons
157
158In 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:
159
160```bash
161npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder}
162```