I am fairly new to SB and confused about all those config files like PLUGS, SETTINGS, STYLE, CONFIG:
Are these files meant to be Markdown files?
Do their file names need to end with .md like e.g. PLUGS.md?
Do these files require to wrap content into respecitve code blocks?
Example:
Assume I want to add - ghr:janssen-io/silverbullet-external-libraries to the PLUGS file. How does this need to look like? Does the line need to be placed in a code block like this:
Note: The block would need to end with the trailing ``` but I can’t make them visible in the above code block. They always get interpreted as the actual block end
In many posts here I see the snippets of stuff for those files, but I don’t know how the exact syntax inside the config files needs to look like.
Thanks a lot for your reply. Now I am slightly more confused . What file is shown on that screenshot? What is it’s name and where can it be found?
I am wondering: Are those files like PLUGS, SETTINGS and STYLE out-dated? I should add, that I installed v2 of SilverBullet. Are those files related to v1?
I am confused by all the information I find here since it seems to me that a lot originates from a time were there was only what we today call “v1”. And not all of that seems to apply to v2 anymore. I am struggling to find my course through the jungle
This is the default (minus the treeview plugin I installed) config in the CONFIG file. You can find it among the files in the search (ctrl + k). I understand you’re having troubles with installing a plugin, right? I assume from the hyphen you put in front of the plugin line. I tried to install treeview the same way, but then remembered this is actually Lua and you have to put it in quotation marks.
@phxyz12 here’s the gist: in v2 you can put space-lua and space-style blocks anywhere you want, in any file. so you can put your configs in any file you want, even spread out among multiple. however, if you have a centralized config (in one place), it’s recommended to put that in a file named CONFIG.md (it will show up as just CONFIG in silverbullet) for consistency.
in v2, config is done with space-lua rather than YAML, so to install plugs you would write
in v1, config was done with PLUGS and SETTINGS, those are no longer used in silverbullet. you can keep your STYLES file, since space-style still works the same.
thanks a lot, now it’s getting clearer. It couldn’t work, I mixed v1 config files together with v1 config formats into my v2, luckily, it didn’t catch fire
I will try the approach that @stag outlined and I will go with a central CONFIG file. Maybe a config folder with a few config files to sort things a bit.
One more question:
I was initially attempting to install the journal calendar support described here:
In the discussion there, it is stated that this feature is now available from here:
So I wanted to install that “Silverbullet_Libraries” but the description there refers again to v1. To be honest, I don’t understand the difference between plugs and libraries.
Side note: I came accros posts here mentioning a folder Library/std/.... My setup is a Docker container (using the docker-compose file) and so in my space directory, there is no such thing like a Library folder.
Sorry for asking to many confusing questions, I hope I will see clear at some time.
Author of the calendar script here.
I agree, that this all might be a bit confusing… I’m not fully used to v2 myself to be honest…
However this might bring some light:
the difference of plugs and libraries is complicated… I would say, plugs are more sophisticated packages, that contain compiled typescript code, functions and may include other contents. They can be installed pretty easy with Silverbullets built in installer. From my point of view, they were needed mainly before v2, (but most work also with v2)
Libraries on the other hand, are part of v2 as far as i know. Some are Part of the distribution of Silverbullet. (Library/Std/…), but not visible as files, but let’s say as kind of virtual pages - you see them inside SB, but you cannot edit them.
However, you are able to easily add your own libraries, as they are made of simple SB pages containing code blocks (e.g. Lua) and space styles and configs, which are evaluated on (re-)start
to install such new libraries, for example my calendar one, simply download the files of a given subdirectory to your space (to any subdirectory, but “Libraries/” is a kind of standard) and restart SB.
the mentioned “external libraries” installer is/was just a more convenient way to install before v2