diff options
author | Evan Steinkerchner <esteinkerchner@gmail.com> | 2022-03-20 20:19:49 -0400 |
---|---|---|
committer | Evan Steinkerchner <esteinkerchner@gmail.com> | 2022-03-20 20:19:49 -0400 |
commit | 717894d8c53c0f55ab7e70e9dea6002751c1605d (patch) | |
tree | 34b428f94566dba8b981481f924989351989dc73 | |
parent | a2dfffab6892c6976fc8b880f75c314506259675 (diff) | |
download | homer-717894d8c53c0f55ab7e70e9dea6002751c1605d.tar.gz homer-717894d8c53c0f55ab7e70e9dea6002751c1605d.tar.zst homer-717894d8c53c0f55ab7e70e9dea6002751c1605d.zip |
Initial draft of new docs UI usuing MkDocs
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | docs/images/logo.png | bin | 0 -> 37168 bytes | |||
-rw-r--r-- | docs/images/screenshot.png (renamed from docs/screenshot.png) | bin | 50927 -> 50927 bytes | |||
-rw-r--r-- | docs/index.md | 122 | ||||
-rw-r--r-- | docs/stylesheets/styles.css | 7 | ||||
-rw-r--r-- | mkdocs.yml | 81 |
6 files changed, 217 insertions, 1 deletions
@@ -23,4 +23,10 @@ yarn-error.log* | |||
23 | # App configuration | 23 | # App configuration |
24 | config.yml | 24 | config.yml |
25 | 25 | ||
26 | .drone.yml \ No newline at end of file | 26 | .drone.yml |
27 | |||
28 | # Python venv | ||
29 | venv | ||
30 | |||
31 | # MkDocs | ||
32 | site | ||
diff --git a/docs/images/logo.png b/docs/images/logo.png new file mode 100644 index 0000000..e088a4a --- /dev/null +++ b/docs/images/logo.png | |||
Binary files differ | |||
diff --git a/docs/screenshot.png b/docs/images/screenshot.png index ffa7e79..ffa7e79 100644 --- a/docs/screenshot.png +++ b/docs/images/screenshot.png | |||
Binary files differ | |||
diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..36965ca --- /dev/null +++ b/docs/index.md | |||
@@ -0,0 +1,122 @@ | |||
1 | <div class="centered"> | ||
2 | <img width="180" | ||
3 | alt="Homer's donut" | ||
4 | src="images/logo.png" /> | ||
5 | <h1>Homer</h1> | ||
6 | </div> | ||
7 | |||
8 | <p class="centered"> | ||
9 | A dead simple static <strong>HOM</strong>epage for your serv<strong>ER</strong> to keep | ||
10 | your services on hand, from a simple <code>yaml</code> configuration file. | ||
11 | </p> | ||
12 | |||
13 | <div align="center"> | ||
14 | <a href="https://opensource.org/licenses/Apache-2.0"> | ||
15 | <img alt="License: Apache 2" | ||
16 | src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /> | ||
17 | </a> | ||
18 | <a href="https://gitter.im/homer-dashboard/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"> | ||
19 | <img alt="Gitter chat" | ||
20 | src="https://badges.gitter.im/homer-dashboard/community.svg" /> | ||
21 | </a> | ||
22 | <a href="https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip"> | ||
23 | <img alt="Download homer static build" | ||
24 | src="https://img.shields.io/badge/Download-homer.zip-orange" /> | ||
25 | </a> | ||
26 | <a href="https://github.com/awesome-selfhosted/awesome-selfhosted"> | ||
27 | <img alt="Awesome" | ||
28 | src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" /> | ||
29 | </a> | ||
30 | </div> | ||
31 | |||
32 | ## Demo | ||
33 | |||
34 | [![Demo](images/screenshot.png)](https://homer-demo.netlify.app) | ||
35 | [Check out the demo!](https://homer-demo.netlify.app) | ||
36 | |||
37 | ## Features | ||
38 | |||
39 | - [yaml](http://yaml.org/) file configuration | ||
40 | - Installable (pwa) | ||
41 | - Search | ||
42 | - Grouping | ||
43 | - Theme customization | ||
44 | - Offline health check | ||
45 | - keyboard shortcuts: | ||
46 | - `/` Start searching. | ||
47 | - `Escape` Stop searching. | ||
48 | - `Enter` Open the first matching result (respects the bookmark's `_target` property). | ||
49 | - `Alt`/`Option` + `Enter` Open the first matching result in a new tab. | ||
50 | |||
51 | ## Getting started | ||
52 | |||
53 | Homer is a full static html/js dashboard, generated from the source in `/src` using webpack. It's meant to be served by an HTTP server, **it will not work if you open dist/index.html directly over file:// protocol**. | ||
54 | |||
55 | See [documentation](docs/configuration.md) for information about the configuration (`assets/config.yml`) options. | ||
56 | |||
57 | ### Using docker | ||
58 | |||
59 | To launch container: | ||
60 | |||
61 | ```sh | ||
62 | docker run -d \ | ||
63 | -p 8080:8080 \ | ||
64 | -v </your/local/assets/>:/www/assets \ | ||
65 | --restart=always \ | ||
66 | b4bz/homer:latest | ||
67 | ``` | ||
68 | |||
69 | Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner (`docker run -e "UID=1000" -e "GID=1000" [...]`). | ||
70 | |||
71 | ### Using docker-compose | ||
72 | |||
73 | The `docker-compose.yml` file must be edited to match your needs. | ||
74 | Set the port and volume (equivalent to `-p` and `-v` arguments): | ||
75 | |||
76 | ```yaml | ||
77 | volumes: | ||
78 | - /your/local/assets/:/www/assets | ||
79 | ports: | ||
80 | - 8080:8080 | ||
81 | ``` | ||
82 | |||
83 | To launch container: | ||
84 | |||
85 | ```sh | ||
86 | cd /path/to/docker-compose.yml | ||
87 | docker-compose up -d | ||
88 | ``` | ||
89 | |||
90 | Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner, also in `docker-compose.yml`: | ||
91 | |||
92 | ```yaml | ||
93 | environment: | ||
94 | - UID=1000 | ||
95 | - GID=1000 | ||
96 | ``` | ||
97 | |||
98 | ### Using the release tarball (prebuilt, ready to use) | ||
99 | |||
100 | Download and extract the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `assets/config.yml.dist` file to `assets/config.yml`, and put it behind a web server. | ||
101 | |||
102 | ```sh | ||
103 | wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip | ||
104 | unzip homer.zip | ||
105 | cd homer | ||
106 | cp assets/config.yml.dist assets/config.yml | ||
107 | npx serve # or python -m http.server 8010 or apache, nginx ... | ||
108 | ``` | ||
109 | |||
110 | ### Build manually | ||
111 | |||
112 | ```sh | ||
113 | # Using yarn (recommended) | ||
114 | yarn install | ||
115 | yarn build | ||
116 | |||
117 | # **OR** Using npm | ||
118 | npm install | ||
119 | npm run build | ||
120 | ``` | ||
121 | |||
122 | Then your dashboard is ready to use in the `/dist` directory. | ||
diff --git a/docs/stylesheets/styles.css b/docs/stylesheets/styles.css new file mode 100644 index 0000000..e1e1a3e --- /dev/null +++ b/docs/stylesheets/styles.css | |||
@@ -0,0 +1,7 @@ | |||
1 | .centered { | ||
2 | text-align: center; | ||
3 | } | ||
4 | |||
5 | .bold { | ||
6 | font-weight: bold; | ||
7 | } \ No newline at end of file | ||
diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..58e37c3 --- /dev/null +++ b/mkdocs.yml | |||
@@ -0,0 +1,81 @@ | |||
1 | # Project information | ||
2 | site_name: Homer | ||
3 | site_url: https://bastienwirtz.github.io/homer/ | ||
4 | |||
5 | # Repository | ||
6 | repo_name: bastienwirtz/homer | ||
7 | repo_url: https://github.com/bastienwirtz/homer | ||
8 | edit_uri: "" | ||
9 | |||
10 | # Stylesheet | ||
11 | extra_css: | ||
12 | - stylesheets/styles.css | ||
13 | |||
14 | # Theme | ||
15 | theme: | ||
16 | logo: images/logo.png | ||
17 | name: material | ||
18 | palette: | ||
19 | - media: "(prefers-color-scheme: light)" | ||
20 | scheme: default | ||
21 | primary: blue | ||
22 | accent: blue | ||
23 | toggle: | ||
24 | icon: material/brightness-4 | ||
25 | name: Switch to dark mode | ||
26 | - media: "(prefers-color-scheme: dark)" | ||
27 | scheme: slate | ||
28 | primary: blue | ||
29 | accent: blue | ||
30 | toggle: | ||
31 | icon: material/brightness-7 | ||
32 | name: Switch to light mode | ||
33 | features: | ||
34 | - content.code.annotate | ||
35 | - navigation.indexes | ||
36 | - navigation.sections | ||
37 | - navigation.top | ||
38 | - navigation.tracking | ||
39 | - search.highlight | ||
40 | - search.share | ||
41 | - search.suggest | ||
42 | - toc.follow | ||
43 | |||
44 | # Copyright - name for footer text | ||
45 | copyright: Homer dashboard | ||
46 | |||
47 | # Socials | ||
48 | extra: | ||
49 | social: | ||
50 | - icon: fontawesome/brands/github | ||
51 | link: https://github.com/bastienwirtz/homer | ||
52 | - icon: fontawesome/brands/gitter | ||
53 | link: https://gitter.im/homer-dashboard/community | ||
54 | - icon: fontawesome/brands/docker | ||
55 | link: https://hub.docker.com/r/b4bz/homer | ||
56 | |||
57 | # Extensions | ||
58 | markdown_extensions: | ||
59 | - abbr | ||
60 | - admonition | ||
61 | - attr_list | ||
62 | - def_list | ||
63 | - footnotes | ||
64 | - meta | ||
65 | - md_in_html | ||
66 | - toc: | ||
67 | permalink: true | ||
68 | - pymdownx.highlight: | ||
69 | anchor_linenums: true | ||
70 | - pymdownx.inlinehilite | ||
71 | - pymdownx.snippets | ||
72 | - pymdownx.superfences | ||
73 | |||
74 | # Page tree | ||
75 | nav: | ||
76 | - Home: index.md | ||
77 | - Configuration: configuration.md | ||
78 | - Custom services: customservices.md | ||
79 | - Tips & tricks: tips-and-tricks.md | ||
80 | - Development: development.md | ||
81 | - Troubleshooting: troubleshooting.md | ||