]> git.immae.eu Git - github/bastienwirtz/homer.git/blob - docs/configuration.md
1ced2d8174e35ab40c702d32f35eb28eef932b31
[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 developement 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 logo: "assets/homer.png"
17 # Alternatively a fa icon can be provided:
18 # icon: "fas fa-skull-crossbones"
19
20 header: true # Set to false to hide the header
21 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.
22
23 columns: "3" # "auto" or number (must be a factor of 12: 1, 2, 3, 4, 6, 12)
24 connectivityCheck: true # whether you want to display a message when the apps are not accessible anymore (VPN disconnected for example)
25
26 # Optional theming
27 theme: default # 'default' or one of the theme available in 'src/assets/themes'.
28
29 # Here is the exaustive list of customization parameters
30 # However all value are optional and will fallback to default if not set.
31 # if you want to change only some of the colors, feel free to remove all unused key.
32 colors:
33 light:
34 highlight-primary: "#3367d6"
35 highlight-secondary: "#4285f4"
36 highlight-hover: "#5a95f5"
37 background: "#f5f5f5"
38 card-background: "#ffffff"
39 text: "#363636"
40 text-header: "#424242"
41 text-title: "#303030"
42 text-subtitle: "#424242"
43 card-shadow: rgba(0, 0, 0, 0.1)
44 link-hover: "#363636"
45 background-image: "assets/your/light/bg.png"
46 dark:
47 highlight-primary: "#3367d6"
48 highlight-secondary: "#4285f4"
49 highlight-hover: "#5a95f5"
50 background: "#131313"
51 card-background: "#2b2b2b"
52 text: "#eaeaea"
53 text-header: "#ffffff"
54 text-title: "#fafafa"
55 text-subtitle: "#f5f5f5"
56 card-shadow: rgba(0, 0, 0, 0.4)
57 link-hover: "#ffdd57"
58 background-image: "assets/your/dark/bg.png"
59
60 # Optional message
61 message:
62 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
63 style: "is-warning"
64 title: "Optional message!"
65 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
66
67 # Optional navbar
68 # links: [] # Allows for navbar (dark mode, layout, and search) without any links
69 links:
70 - name: "Link 1"
71 icon: "fab fa-github"
72 url: "https://github.com/bastienwirtz/homer"
73 target: "_blank" # optional html tag target attribute
74 - name: "link 2"
75 icon: "fas fa-book"
76 url: "https://github.com/bastienwirtz/homer"
77
78 # Services
79 # First level array represent a group.
80 # Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
81 services:
82 - name: "Application"
83 icon: "fa fa-code-fork"
84 items:
85 - name: "Awesome app"
86 logo: "assets/tools/sample.png"
87 # Alternatively a fa icon can be provided:
88 # icon: "fab fa-jenkins"
89 subtitle: "Bookmark example"
90 tag: "app"
91 url: "https://www.reddit.com/r/selfhosted/"
92 target: "_blank" # optional html tag target attribute
93 - name: "Another one"
94 logo: "assets/tools/sample2.png"
95 subtitle: "Another application"
96 tag: "app"
97 # Optional tagstyle
98 tagstyle: "is-success"
99 url: "#"
100 - name: "Other group"
101 icon: "fas fa-heartbeat"
102 items:
103 - name: "Another app"
104 logo: "assets/tools/sample.png"
105 subtitle: "Another example"
106 tag: "other"
107 url: "https://www.reddit.com/r/selfhosted/"
108 target: "_blank" # optionnal html a tag target attribute
109 ```
110
111 If you choose to fetch message information from an endpoint, the output format should be:
112
113 ```json
114 {
115 "style": null,
116 "title": "Lorem ipsum 42",
117 "content": "LA LA LA Lorem ipsum dolor sit amet, ....."
118 }
119 ```
120
121 `null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
122 Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
123
124 ### Style Options
125
126 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:
127
128 - `is-info` (blue)
129 - `is-success` (green)
130 - `is-warning` (yellow)
131 - `is-danger` (red)
132
133 You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.
134
135 ### PWA Icons
136
137 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:
138
139 ```bash
140 npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder}
141 ```