glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
8.56k stars 297 forks source link

[Request] Add an !include <file> like what Home Assistant does for the config. #254

Open Krojack opened 1 week ago

Krojack commented 1 week ago

Currently in Home Assistant you can include other YML files to help keep things somewhat clean.

Small example:

pages:
  - name: Home
    columns:
      - size: small
        widgets: !include page-1-widgets-left.yml
      - size: full
        widgets: !include page-1-widgets-middle.yml
      - size: small
        widgets: !include page-1-widgets-right.yml
  - name: Bookmarks
    columns:
      - size: small
        widgets: !include page-2-widgets-left.yml
      - size: full
        widgets: !include page-2-widgets-middle.yml
      - size: small
        widgets: !include page-2-widgets-right.yml

This would then load the contents of page-1-widgets-left.yml in that spot.

Rather than have everything in one large file, you could break things down into separate files.

svilenmarkov commented 1 week ago

Hey, thanks for the suggestion!

The syntax likely won't be the same and there may be some quirks but I can add something like this for the next release.