You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 🖼️ Options for a full-screen background image, custom nav-bar links, HTML footer, title, etc.
81
82
- 🚀 Easy to setup with Docker, or on bare metal, or with 1-Click cloud deployment
@@ -413,11 +414,11 @@ Dashy supports multiple languages and locales. When available, your language sho
413
414
- 🇸🇮 **Slovenian**: `sl`- Contributed by **[@UrekD](https://github.com/UrekD)**
414
415
- 🇸🇪 **Swedish**: `sv`- Contributed by **[@BOZG](https://github.com/BOZG)**
415
416
- 🇮🇹 **Italian**: `it`- Contributed by **[@alexdelprete](https://github.com/alexdelprete)**
416
-
- 🇵🇹 **Portuguese**: `pt`- Machine Translated *(awaiting human review)*
417
+
- 🇵🇹 **Portuguese**: `pt`- Contributed by **[@LeoColman](https://github.com/LeoColman)**
417
418
- 🇷🇺 **Russian**: `ru`- Contributed by Anon
418
-
- 🇦🇪 **Arabic**: `ar`- Contributed by Anon
419
-
- 🇮🇳 **Hindi**: `hi`- Contributed by Anon
420
-
- 🇯🇵 **Japanese**: `ja`- Contributed by Anon
419
+
- 🇦🇪 **Arabic**: `ar`
420
+
- 🇮🇳 **Hindi**: `hi`
421
+
- 🇯🇵 **Japanese**: `ja`
421
422
422
423
#### Add your Language
423
424
I would love Dashy to be available to everyone without language being a barrier to entry. If you've got a few minutes to spare, consider adding translations for your language. It's a quick task, and all text is in [a single JSON file](https://github.com/Lissy93/dashy/tree/master/src/assets/locales). Since any missing text will fall back to English, you don't need to translate it all.
@@ -426,6 +427,34 @@ I would love Dashy to be available to everyone without language being a barrier
426
427
427
428
---
428
429
430
+
## Multi-Page Support 📃
431
+
432
+
> For full multi-page documentation, see: [**Pages & Sections**](./docs/pages-and-sections.md)
433
+
434
+
Within your dashboard, you can have as many sub-pages as you require. To load additional pages, specify a name, and path to a config file under `pages`. The config file can be either local (stored in `/public`), or remote (located anywhere accessible).
435
+
436
+
```yaml
437
+
pages:
438
+
- name: Networking Services
439
+
path: 'networking.yml'
440
+
- name: Work Stuff
441
+
path: 'work.yml'
442
+
```
443
+
444
+
Or
445
+
446
+
```yaml
447
+
pages:
448
+
- name: Getting Started
449
+
path: 'https://snippet.host/tvcw/raw'
450
+
- name: Homelab
451
+
path: 'https://snippet.host/tetp/raw'
452
+
- name: Browser Startpage
453
+
path: 'https://snippet.host/zcom/raw'
454
+
```
455
+
456
+
---
457
+
429
458
## System Requirements 📊
430
459
431
460
If running on bare metal, Dashy requires [Node](https://nodejs.org/en/) V 16.0.0 or later, LTS (16.13.2) is recommended.
@@ -56,6 +57,7 @@ The following file provides a reference of all supported configuration options.
56
57
**`pageInfo`** | `object` | Required | Basic meta data like title, description, nav bar links, footer text. See [`pageInfo`](#pageinfo)
57
58
**`appConfig`** | `object` | _Optional_ | Settings related to how the app functions, including API keys and global styles. See [`appConfig`](#appconfig-optional)
58
59
**`sections`** | `array` | Required | An array of sections, each containing an array of items, which will be displayed as links. See [`section`](#section)
60
+
**`pages`** | `array` | _Optional_ | An array additional config files, used for multi-page dashboards. See [`pages`](#pages-optional)
59
61
60
62
**[⬆️ Back to Top](#configuring)**
61
63
@@ -81,6 +83,15 @@ The following file provides a reference of all supported configuration options.
**`name`** | `string` | Required | A unique name for that page
91
+
**`path`** | `string` | Required | The path (local or remote) to the config file to use.<br>For files located within `/public`, you only need to specify filename, for externally hosted files you must include the full URL
You can have additional pages within your dashboard, with each having it's own config file. The config files for sub-pages can either be stored locally, or hosted separately. A link to each additional page will be displayed in the navigation bar.
6
+
7
+
You can edit additional pages using the interactive editor, exactly the same was as your primary page (so long as it's local). But please save changes to one page, before you start editing the next.
8
+
9
+
### Using Local Sub-Pages
10
+
11
+
To get started, create a new `.yml` config file for your sub-page, placing it within `/app/public`. Then within your primary `conf.yml`, choose a name, and specify the path to the new file.
12
+
13
+
For example:
14
+
15
+
```yaml
16
+
pages:
17
+
- name: Networking Services
18
+
path: 'networking.yml'
19
+
- name: Work Stuff
20
+
path: 'work.yml'
21
+
```
22
+
23
+
If you're sub-page is located within `/app/public`, then you only need to specify the filename, but if it's anywhere else, then the full path is required.
24
+
25
+
### Using Remote Sub-Pages
26
+
27
+
Config files don't need to be local, you can store them anywhere, and data will be imported as sub-pages on page load.
28
+
29
+
For example:
30
+
31
+
```yaml
32
+
pages:
33
+
- name: Getting Started
34
+
path: 'https://snippet.host/tvcw/raw'
35
+
- name: Homelab
36
+
path: 'https://snippet.host/tetp/raw'
37
+
- name: Browser Startpage
38
+
path: 'https://snippet.host/zcom/raw'
39
+
```
40
+
41
+
There are many options of how this can be used. You could store your config within a Git repository, in order to easily track and rollback changes. Or host your config on your NAS, to have it backed up with the rest of your files. Or use a hosted paste service, for example [snippet.host](https://snippet.host/), which supports never-expiring CORS-enabled pastes, which can also be edited later.
42
+
43
+
You will obviously not be able to write updates to remote configs directly through the UI editor, but you can still make and preview changes, then use the export menu to get a copy of the new config, which can then be pasted to the remote source manually.
44
+
The config file must, of course be accessible from within Dashy. If your config contains sensitive info (like API keys, credentials, secret URLs, etc), take care not to expose it to the internet.
45
+
46
+
The following example shows creating a config, publishing it as a [Gist](https://gist.github.com/), copying the URL to the raw file, and using it within your dashboard.
47
+
48
+
<p align="center">
49
+
<img width="700" alt="Public config in a gist demo"
Only top-level fields supported by sub-pages are `pageInfo` and `sections`. The `appConfig` and `pages` will always be inherited from your main `conf.yml` file. Other than that, sub-pages behave exactly the same as your default view, and can contain sections, items, widgets and page info like nav links, title and logo.
57
+
58
+
Note that since page paths are required by the router, they are set at build-time, not run-time, and so a rebuild (happens automatically) is required for changes to page paths to take effect (this only applies to changes to the `pages` array, rebuild isn't required for editing page content).
Copy file name to clipboardexpand all lines: docs/theming.md
+10
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,16 @@ Custom CSS can be developed, tested and applied directly through the UI. Althoug
69
69
70
70
This can be done from the Config menu (spanner icon in the top-right), under the Custom Styles tab. This is then associated with `appConfig.customCss` in local storage. Styles can also be directly applied to this attribute in the config file, but this may get messy very quickly if you have a lot of CSS.
71
71
72
+
### Page-Specific Styles
73
+
74
+
If you've got multiple pages within your dashboard, you can choose to target certain styles to specific pages. The top-most element within `<body>` will have a class name specific to the current sub-page. This is usually the page's name, all lowercase, with dashes instead of spaces, but you can easily check this yourself within the dev tools.
75
+
76
+
For example, if the pages name was "CFT Toolbox", and you wanted to target `.item`s, you would do:
77
+
78
+
```css
79
+
.cft-toolbox .item { border: 4px solid yellow; }
80
+
```
81
+
72
82
### Loading External Stylesheets
73
83
74
84
The URI of a stylesheet, either local or hosted on a remote CDN can be passed into the config file. The attribute `appConfig.externalStyleSheet` accepts either a string, or an array of strings. You can also pass custom font stylesheets here, they must be in a CSS format (for example, `https://fonts.googleapis.com/css2?family=Cutive+Mono`).
@@ -104,6 +105,21 @@ Alternatively, as a workaround, you have several options:
104
105
105
106
---
106
107
108
+
## Remote Config Not Loading
109
+
110
+
If you've got a multi-page dashboard, and are hosting the additional config files yourself, then CORS rules will apply. A CORS error will look something like:
111
+
112
+
```
113
+
Access to XMLHttpRequest at 'https://example.com/raw/my-config.yml' from origin 'http://dashy.local' has been blocked by CORS policy:
114
+
No 'Access-Control-Allow-Origin' header is present on the requested resource.
115
+
```
116
+
117
+
The solution is to add the appropriate headers onto the target server, to allow it to accept requests from the origin where you're running Dashy.
118
+
119
+
If it is a remote service, that you do not have admin access to, then another option is to proxy the request. Either host your own, or use a publicly accessible service, like [allorigins.win](https://allorigins.win), e.g: `https://api.allorigins.win/raw?url=https://pastebin.com/raw/4tZpaJV5`. For git-based services specifically, there's [raw.githack.com](https://raw.githack.com/)
120
+
121
+
---
122
+
107
123
## Auth Validation Error: "should be object"
108
124
109
125
In V 1.6.5 an update was made that in the future will become a breaking change. You will need to update you config to reflect this before V 2.0.0 is released. In the meantime, your previous config will continue to function normally, but you will see a validation warning. The change means that the structure of the `appConfig.auth` object is now an object, which has a `users` property.
0 commit comments