# 0.9.0: The one with Space Config

**URL:** <https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791>\
**Category:** Announcements\
**Created:** [August 4, 2024, 9:45am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791 "2024-08-04T09:45:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [August 4, 2024, 9:45am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/1 "2024-08-04T09:45:18Z")

</div>

This is a more major version bump due to [Space Config](https://silverbullet.md/Space%20Config), which is a bigger architectural change. It shouldn’t break anything for existing users — but you know — famous last words. Please report bugs as you find them, they may be there.

Without further ado…

- [Space Config](https://silverbullet.md/Space%20Config) is here! We hear you like Space stuff ([Space Script](https://silverbullet.md/Space%20Script) and [Space Style](https://silverbullet.md/Space%20Style)) so we keep adding more! This allows you to distribute your [SETTINGS](https://silverbullet.md/SETTINGS) across pages. A few things of note:
  - This is quite a _deep architectural change_ so I may have accidentally broken things I didn’t intend to, please report issues.
  - There is now a `@config` global variable that you can reference from anywhere containing the space’s currently active full configuration
  - There is now linting (checking) of `space-config` blocks, checking that you use built-in configuration keys correctly and reporting errors if not. Later this will be extended to allow plugs and space scripts to define custom validators as well (based on JSON schema).
  - Possible side-effect: if you configured a custom `indexPage` and are upgrading, it may be that your initial load brings you back to `index`. Just let the space reindex finish and reload and you should be good.
  - **Plug developers** : If you were using the `readSetting` library call, please switch to using the new `system.getSpaceConfig()` syscall instead once this is released. `readSetting` read the `SETTINGS` page only, this may now no longer give the full picture.

- [Transclusions](https://silverbullet.md/Transclusions) now support audio, video and PDFs in addition to images (by [onespaceman](https://github.com/silverbulletmd/silverbullet/pull/1008))
- New [Space Overview](https://silverbullet.md/Library/Core/Page/Space%20Overview) library page part of the [Core](https://silverbullet.md/Library/Core) Library that lists all of your [Space Config](https://silverbullet.md/Space%20Config), [Space Style](https://silverbullet.md/Space%20Style) and [Space Script](https://silverbullet.md/Space%20Script) as well as some other fun stats.
- Support for adding CSS classes in [Page Decorations](https://silverbullet.md/Page%20Decorations) (by [onespaceman](https://github.com/silverbulletmd/silverbullet/pull/945)). Check out [Page Decorations#Use case: pimp my page](https://silverbullet.md/Page%20Decorations) 🤣
- Added caching to file listings (useful for large spaces or slow disks) (by [Justyn Shull](https://github.com/silverbulletmd/silverbullet/pull/1012))

I’m cc’ing @justyns @Maarrk and @joekrill here, because they have plugs that use the old `readSetting` API, please switch to using `system.getSpaceConfig("mykey")` for future releases, because you can no longer assume that settings are kept just in SETTINGS from henceforth.

---

<div class="post-metadata">

**Author:** ![atomicpapa](https://community.silverbullet.md/user_avatar/community.silverbullet.md/atomicpapa/32/397_2.png) [@atomicpapa](https://community.silverbullet.md/u/atomicpapa)\
**Post date:** [August 5, 2024, 1:33am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/2 "2024-08-05T01:33:27Z")

</div>

Was something changed related to actionButtons? I still see them in my SETTINGS file, but they aren’t showing up in the header.

 ![image](https://community.silverbullet.md/uploads/default/original/1X/454dd12cb10f7d14bfb04d6327de7d31c4f625c8.png)

```auto
actionButtons:
- icon: home
  command: "{[Navigate: Home]}"
  description: "Go to the index page"
- icon: search 
  command: "{[Search Space]}"
  description: "Search"
- icon: book
  command: "{[Navigate: Page Picker]}"
  description: Open page
- icon: terminal
  command: "{[Open Command Palette]}"
  description: Run command
- icon: arrow-left
  command: "{[Navigate: Back in History]}"
  description: "Go to the previous page"
  mobile: true
- icon: calendar
  command: '{[Notes: Today]}'
  description: "Open today's notes"
- icon: mail
  command: '{[Navigate: To Page]("QuickNotes")}'
  description: "Quick Notes Inbox"
- icon: check-square
  command: '{[Navigate: To Page]("tasks")}'
  description: Tasks
- icon: sidebar
  command: "{[Tree View: Toggle]}"

```

---

<div class="post-metadata">

**Author:** ![i\_am\_dangry](https://community.silverbullet.md/user_avatar/community.silverbullet.md/i_am_dangry/32/357_2.png) [@i\_am\_dangry](https://community.silverbullet.md/u/i_am_dangry)\
**Post date:** [August 5, 2024, 1:46am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/3 "2024-08-05T01:46:57Z")

</div>

Reload the page and force a cache refresh in your browser. On windows this is `ctrl + shift + r`

Some of my clients were caching old settings, especially those in sync mode. They didn’t seem to re-index, read settings through space-config etc until I did a couple of `ctrl + shift + r`’s

---

<div class="post-metadata">

**Author:** ![atomicpapa](https://community.silverbullet.md/user_avatar/community.silverbullet.md/atomicpapa/32/397_2.png) [@atomicpapa](https://community.silverbullet.md/u/atomicpapa)\
**Post date:** [August 5, 2024, 2:28am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/4 "2024-08-05T02:28:26Z")

</div>

I had already tried multiple forced refreshes before posting. Tried clearing cache and then doing more forced refreshes.

---

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [August 5, 2024, 4:25am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/5 "2024-08-05T04:25:03Z")

</div>

Try making a small change to your SETTINGS file and then re loading again, does that help?

If not, update the Core library, this will pull in the new [Library/Core/Page/Space Overview](https://silverbullet.md/Library/Core/Page/Space%20Overview) meta page.

Open that with the meta picker and have a look at the Active space config section. Do you see the actionButtons there?

---

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [August 5, 2024, 4:28am UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/6 "2024-08-05T04:28:32Z")

</div>

Another note: this release will kick off a full space reindex, and only after that your config may be complete. So if you have a large space, this may take some time. Watch the (server) logs to see if it’s still indexing.

---

<div class="post-metadata">

**Author:** ![joekrill](https://community.silverbullet.md/user_avatar/community.silverbullet.md/joekrill/32/170_2.png) [@joekrill](https://community.silverbullet.md/u/joekrill)\
**Post date:** [August 5, 2024, 1:38pm UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/7 "2024-08-05T13:38:18Z")

</div>

There’s currently no way to support both pre-0.9.0 silverbullet and post-0.9.0 Silverbullet. In the treeview plug I tried updating the import to use v0.9.0 of the plug API thinking I could check the version and use `getSpaceConfig` if it’s supported, otherwise fallback to `readSetting` – this way the plug will continue to work for folks who haven’t upgraded yet. But because `readSetting` now actually [just called getSpaceConfig](https://github.com/silverbulletmd/silverbullet/blob/main/plug-api/lib/settings_page.ts#L14C23-L14C37), it’s always going to fail for anyone using \< 0.9.0.

Should the API upgrades be conscious of these sorts of changes and fallback gracefully?

---

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [August 5, 2024, 2:28pm UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/8 "2024-08-05T14:28:32Z")

</div>

Good question.

What I could have done is update the `readSetting` function with an attempt at calling getSpaceConfig and then falling back to the old implementation (just with a try-catch). I can still update the implementation to that actually, then you could rely on that implementation. This would then be part of 0.9.1, sounds reasonable?

A more “wreckless approach” would be to say: we’ll assume people regularly update SilverBullet, at least as often as they update plugs. So this should be fine. New users will also install the new version of treeview so all is good. People don’t tend to run “Plugs: Update” often (I imagine), and if they don’t the old version will keep working.

That said, let me just update the implementation so for 0.9.1 it will be nicer.

---

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [August 5, 2024, 2:35pm UTC](https://community.silverbullet.md/t/0-9-0-the-one-with-space-config/791/9 "2024-08-05T14:35:51Z")

</div>

@joekrill [Fallback for readSetting for old SB versions · silverbulletmd/silverbullet@51f756e · GitHub](https://github.com/silverbulletmd/silverbullet/commit/51f756ec6090fa3a3a9c786dcb18488a68e3babf)

So you can wait for the next release and update to this, or you can do something similar yourself.
