-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Rework pages to present views of existing widgets #343
Comments
This sounds like it could be solved with the Environment variables anywhere in the config that was just released in v0.7.0. You'd declare all of these variables in the docker-compose.yml file or (in a .env file - haven't tested that yet), and then be able to use those variables in the glance.yml so you really only have 1 place to edit and it would propagate to both pages. Any changes in the docker-compose.yml file would require a restart (so you'd lose the capability to auto reload the glance.yml file on a config change), but might work to reduce the number of places you'd need to edit. |
I'm working with bare metal, but thanks - I'll look into it. |
You can do this with YAML anchors: define:
- &shared-bookmarks
type: bookmarks
groups:
- title: General
links:
- title: Github
url: https://github.com/
- &shared-videos
type: videos
channels:
- UCXuqSBlHAE6Xw-yeJA0Tunw
pages:
- name: Home
columns:
- size: full
widgets:
- *shared-bookmarks
- *shared-videos
- type: clock
- name: Other
columns:
- size: full
widgets:
- *shared-bookmarks
- *shared-videos
- type: search |
Thank you! THIS is what I was after. It would be good to have an example of it in the docs, no? |
P.S. Hah! I kill me. |
Description
My
glance.yml
file is a bit chunky atm. I have three pages: Home, Home+, and ScratchPad.The first is a simplified layout without any social distractions (no hacker news, no reddit, etc). There is only the monitors of my services, bookmarks, and search... weather widget, calendar.
The second one is the same layout with the distractions.
The third one is irrelevant (it's an embedded iFrame to a very simple web notepad - super handy, though).
There is a LOT of config file duplication to achieve this setup. It means I have to add and remove bookmarks and monitor widgets twice every time. Not ideal. Unfortunately, I need to be vigilant, as my ability to focus or relax varies greatly, so I have to have both options available to me.
To the point at hand:
Is there a way to use yaml templating so the bookmarks and monitors need only be defined once, then referenced in the actual page definitions? Or something like this?
The text was updated successfully, but these errors were encountered: