]> git.immae.eu Git - github/bastienwirtz/homer.git/blob - README.md
Merge pull request #48 from issmirnov/patch-1
[github/bastienwirtz/homer.git] / README.md
1 # Homer
2
3 A dead simple static **HOM**epage for your serv**ER** to keep your services on hand, from a simple `yaml` configuration file.
4
5 **Check out the live demo [here](https://homer-demo.netlify.app).**
6
7 It supports keyboard shortcuts:
8
9 * `/` Start searching.
10 * `Escape` Stop searching.
11 * `Enter` Open the first matching result (respects the bookmark's `_target` property).
12 * `Alt`/`Option` + `Enter` Open the first matching result in a new tab.
13
14 If you need authentication support, you're on your own (it can be secured using a web server auth module or exposing it only through a VPN network / SSH tunnel, ...)
15
16 ![screenshot](https://raw.github.com/bastienwirtz/homer/master/screenshot.png)
17
18 ## Roadmap
19
20 * [ ] Colors / theme customization
21 * [ ] Enable PWA support (making possible to "install" - add to homescreen - it)
22 * [ ] Improve maintainability (external library import & service workers cached file list.)
23
24 ## Installation
25
26 ### Using docker
27
28 ```sh
29 sudo docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest
30 ```
31
32 ### Manually
33
34 **How to build / install it?** There is no build system (😱), use it like that! It's meant to be stupid simple & zero maintenance required. Just copy the static files somewhere, and visit the `index.html`.
35
36 ## Configuration
37
38 Title, icons, links, colors, and services can be configured in the `config.yml` file, using [yaml](http://yaml.org/) format.
39
40 ```yaml
41 ---
42 # Homepage configuration
43 # See https://fontawesome.com/icons for icons options
44
45 title: "Simple homepage"
46 subtitle: "Homer"
47 logo: "assets/homer.png"
48 # Alternatively a fa icon can be provided:
49 # icon: "fas fa-skull-crossbones"
50 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.header:
51
52 # Optional message
53 message:
54 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
55 style: "is-warning"
56 title: "Optional message!"
57 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula."
58
59 # Optional navbar
60 # links: [] # Allows for navbar (dark mode, layout, and search) without any links
61 links:
62 - name: "ansible"
63 icon: "fab fa-github"
64 url: "https://github.com/xxxxx/ansible/"
65 target: '_blank' # optional html a tag target attribute
66 - name: "Wiki"
67 icon: "fas fa-book"
68 url: "https://wiki.xxxxxx.com/"
69
70 # Services
71 # First level array represent a group.
72 # Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
73 services:
74 - name: "DevOps"
75 icon: "fa fa-code-fork"
76 items:
77 - name: "Jenkins"
78 logo: "/assets/tools/jenkins.png"
79 # Alternatively a fa icon can be provided:
80 # icon: "fab fa-jenkins"
81 subtitle: "Continuous integration server"
82 tag: "CI"
83 url: "#"
84 target: '_blank' # optional html a tag target attribute
85 - name: "RabbitMQ Management"
86 logo: "/assets/tools/rabbitmq.png"
87 subtitle: "Manage & monitor RabbitMQ server"
88 tag: "haproxy"
89 # Optional tagstyle
90 tagstyle: "is-success"
91 url: "#"
92 - name: "Monitoring"
93 icon: "fas fa-heartbeat"
94 items:
95 - name: "M/Monit"
96 logo: "/assets/tools/monit.png"
97 subtitle: "Monitor & manage all monit enabled hosts"
98 tag: "monit"
99 url: "#"
100 - name: "Grafana"
101 logo: "/assets/tools/grafana.png"
102 subtitle: "Metric analytics & dashboards"
103 url: "#"
104 - name: "Kibana"
105 logo: "/assets/tools/elastic.png"
106 subtitle: "Explore & visualize logs"
107 tag: "elk"
108 url: "#"
109 - name: "Website monitoring"
110 logo: "/assets/tools/pingdom.png"
111 subtitle: "Pingdom public reports overview"
112 tag: "CI"
113 url: "#"
114
115 ```
116
117 If you choose to fetch message information from an endpoint, the output format should be:
118
119 ```json
120 {
121 "style": null,
122 "title": "Lorem ipsum 42",
123 "content": "LA LA LA Lorem ipsum dolor sit amet, ....."
124 }
125 ```
126
127 `null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
128 Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
129
130 ### Style Options
131
132 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:
133
134 - `is-info` (blue)
135 - `is-success` (green)
136 - `is-warning` (yellow)
137 - `is-danger` (red)
138
139 You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.