# New on Edge: space config

**URL:** https://community.silverbullet.md/t/new-on-edge-space-config/780
**Category:** Edge
**Created:** [August 2, 2024, 3:05pm UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780 "2024-08-02T15:05:41Z")
**Posts on this page:** 7
**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 2, 2024, 3:05pm UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/1 "2024-08-02T15:05:41Z")

</div>

This was a bigger thing than I anticipated. I hope I implemented this so that it is minimally disruptive, but let me know if things break for you.

I may release this as 0.9.x

> **[Space Config](https://silverbullet.md/Space%20Config)**
>
> While SilverBullet tries to set sensible defaults, you may want to tweak a few things here and there.This is where Space Config comes in. You can put fenced code blocks anywhere in your space (but the convention is to use ^SETTINGS) with space-config...

Also see the changelog with notes for Edge: [CHANGELOG](https://silverbullet.md/CHANGELOG#Edge)

A head’s up to all plug developers, such as @justyns @Maarrk @joekrill since you can no longer assume all settings will be in a user’s SETTINGS page, you should probably switch to the new `system.getSpaceConfig()` syscall, which will give you the combined configuration. Not now, but once this is properly released.

Your current code should keep working for some time, but as people switch to using space config, their settings may move elsewhere than just SETTINGS. In addition, for freshly created spaces, new code language for SETTINGS will switch from `yaml` to `space-config`, which the current `readSetting` call that you use does not handle well I think.

Bonus:

Some fun new Library/Core pages like [Library/Core/Page/Space Overview](https://silverbullet.md/Library/Core/Page/Space%20Overview)

---

<div class="post-metadata">

### Author: ![justyns](https://community.silverbullet.md/user_avatar/community.silverbullet.md/justyns/32/132_2.png) [@justyns](https://community.silverbullet.md/u/justyns)
#### Post date: [August 3, 2024, 7:10am UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/2 "2024-08-03T07:10:16Z")

</div>

Very cool, that should help organize things better.

Is there (or can there be) an event to listen to for changes to config? In the AI plug, I’m listening to changes to the SETTINGS page specifically to know when to reload the config

---

<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 3, 2024, 7:42am UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/3 "2024-08-03T07:42:14Z")

</div>

Right. At some point I thought about that but then forgot to do it. Will add.

---

<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 3, 2024, 6:58pm UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/4 "2024-08-03T18:58:00Z")

</div>

Ok, added a `config:loaded` event now.

---

<div class="post-metadata">

### Author: ![justyns](https://community.silverbullet.md/user_avatar/community.silverbullet.md/justyns/32/132_2.png) [@justyns](https://community.silverbullet.md/u/justyns)
#### Post date: [August 4, 2024, 9:30pm UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/5 "2024-08-04T21:30:51Z")

</div>

Is the original SETTINGS page with a yaml code block still intended to work?

Either way, something I noticed is some settings get ignored until after indexing finished. I have a really large directory ignored by `spaceIgnore`, but that directory still got indexed.

Maybe a future enhancement would be to grep for files with `space-config` in them and index those first, then reload the config and continue indexing? Or still load the SETTINGS file first to allow setting some core stuff like the index page, spaceIgnore, and whatever else could affect indexing? I don’t know if it’s worth the effort or not if it’s just a one-time issue though.

---

<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:38am UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/6 "2024-08-05T04:38:05Z")

</div>

Good point. I’d have to think about how to make this better. Right now, from time to time, when an important change is made to an indexer I have a way to force a full space reindex. That was part of this release too. Not too often I hope, but occasionally. A full Reindex will first wipe the existing one and then rebuild it. If you have a large space, or heavy indexing work (like generating embeddings) this can take significant time. All the while your full space config won’t be available.

Perhaps indeed prioritizing SETTINGS is a reasonable hack here… 🤔

---

<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, 7:16am UTC](https://community.silverbullet.md/t/new-on-edge-space-config/780/7 "2024-08-05T07:16:12Z")

</div>

Ok, as of [Pre-index SETTINGS on full space reindex · silverbulletmd/silverbullet@1bb096f · GitHub](https://github.com/silverbulletmd/silverbullet/commit/1bb096f50326e31cfbdc2dbbca81dd7a52c47105) this should be better. This performs an index of SETTINGS before anything else.
