Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Multi-Page Support #617

Merged
merged 31 commits into from
May 1, 2022
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
07f6bfe
:construction: Display additional routes based on pages object
Lissy93 Apr 15, 2022
cf7587b
Merge branch 'master' of github.com:Lissy93/dashy into FEATURE/multi-…
Lissy93 Apr 18, 2022
036bc00
:sparkles: Basic multi-page support working (#584)
Lissy93 Apr 19, 2022
1bc9964
:sparkles: Updates view switcher to support multiple pages (#584)
Lissy93 Apr 20, 2022
f5a8c30
:truck: Refactored saving logic into mixin
Lissy93 Apr 24, 2022
5ab619f
:sparkles: Adds a parameter to specify which config file to edit
Lissy93 Apr 24, 2022
61761e7
:lipstick: Displays which config file is being edited
Lissy93 Apr 24, 2022
7706041
:zap: Improved props for router
Lissy93 Apr 24, 2022
dd49ad7
:zap: Adds store value to determine which view being edited
Lissy93 Apr 24, 2022
9ca11a5
Merge branch 'master' of github.com:Lissy93/dashy into FEATURE/multi-…
Lissy93 Apr 24, 2022
3347dc9
:construction: Working on `pages` form in interactive editor
Lissy93 Apr 25, 2022
bc391e2
:card_file_box: Adds pages to config docs
Lissy93 Apr 26, 2022
d5c5c4f
:memo: Starts writing multi-page docs
Lissy93 Apr 26, 2022
a0ac797
:zap: Put the initialization screen back in
Lissy93 Apr 27, 2022
dfb12ec
:memo: Updates docs for multi-page support
Lissy93 Apr 30, 2022
d765eeb
:truck: Use absolue path to loading styles
Lissy93 Apr 30, 2022
1aecf32
:speech_balloon: Adds copy for the multi-page support editor
Lissy93 Apr 30, 2022
6bf0ecb
:sparkles: Adds option for page-specific custom styling
Lissy93 Apr 30, 2022
a949639
:zap: Use page name for making nav-bar path slug
Lissy93 Apr 30, 2022
a7a7032
:card_file_box: Adds pages to schema
Lissy93 Apr 30, 2022
238c51a
Merge branch 'master' of github.com:Lissy93/dashy into FEATURE/multi-…
Lissy93 Apr 30, 2022
52a0ba5
:bento: Adds icon for multi-page editor form
Lissy93 Apr 30, 2022
eb9a5ab
:necktie: Logic work for multi-page support
Lissy93 Apr 30, 2022
854d04a
Merge branch 'master' of github.com:Lissy93/dashy into FEATURE/multi-…
Lissy93 May 1, 2022
138003c
:lipstick: Updates themes
Lissy93 May 1, 2022
f6df1e7
:memo: Updates multi-page docs
Lissy93 May 1, 2022
f107dbf
:bookmark: Bumps to 2.0.8 and updates changelog
Lissy93 May 1, 2022
7d91d51
:triangular_flag_on_post: Adds warning and note for local save
Lissy93 May 1, 2022
437ec2e
:lipstick: Applies max-width to page path when in footer
Lissy93 May 1, 2022
8c15ab4
:closed_lock_with_key: Adds local path checking
Lissy93 May 1, 2022
c87e13c
:goal_net: Catch error if URL not specificed
Lissy93 May 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
📝 Updates docs for multi-page support
Lissy93 committed Apr 30, 2022
commit dfb12ec8d2191f067fda10c5335e5a75f421c9e6
7 changes: 5 additions & 2 deletions docs/pages-and-sections.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Pages and Sections


## Multi-Page Support

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.

Note that the 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.

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.

### Using Local Sub-Pages

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.
@@ -21,6 +22,8 @@ pages:
path: 'work.yml'
```

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.

### Using Remote Sub-Pages

Config files don't need to be local, you can store them anywhere, and data will be imported as sub-pages on page load.
@@ -39,7 +42,7 @@ pages:

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.

You will obviously not be able to write updates to remote configs 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, and modify the original source manually.
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.
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.

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.