diff --git a/docs/ADR/001 Offline-First PWA.md b/docs/ADR/001 Offline-First PWA.md index b4547e1b..147bd8b8 100644 --- a/docs/ADR/001 Offline-First PWA.md +++ b/docs/ADR/001 Offline-First PWA.md @@ -8,6 +8,10 @@ lastReviewed: "2026-06-19" related: - "[[ADR/002 Sync Engine]]" - "[[ADR/007 Core Application Logic on the Client]]" +references: +- client/service_worker.ts +- client/spaces/sync.ts +- client/data/object_index.ts --- # Context SilverBullet aims to be **offline-first**: it should keep working with no network and feel instant. While we may reach a point in the state of the world some day where Internet connectivity is always available, we’re not there yet. You should be able to access your notes even when you’re in the middle of a dessert, top of a mountain, or 10km deep in the sea. For that, the client keeps a full local copy of your [[Space]] files and keeps working when the server is unreachable. (This offline-first stance later drove the v2 decision to run *all* application logic in the client — see [[ADR/007 Core Application Logic on the Client]].) diff --git a/docs/ADR/002 Sync Engine.md b/docs/ADR/002 Sync Engine.md index 48e280e1..6977590d 100644 --- a/docs/ADR/002 Sync Engine.md +++ b/docs/ADR/002 Sync Engine.md @@ -8,6 +8,10 @@ dependsOn: - "[[ADR/001 Offline-First PWA]]" related: - "[[ADR/010 Rust Backend]]" +references: +- client/spaces/sync.ts +- client/service_worker/sync_engine.ts +- plugs/sync/sync.ts --- # Context Because the client keeps a full local copy of the space ([[ADR/001 Offline-First PWA]]), it has to be reconciled with the server's copy. A [[Sync]] engine keeps the client's local copy and the server's files in agreement, in both directions, including after offline edits. diff --git a/docs/ADR/003 Indexed Object Graph.md b/docs/ADR/003 Indexed Object Graph.md index 31e3ae3c..3d6cba97 100644 --- a/docs/ADR/003 Indexed Object Graph.md +++ b/docs/ADR/003 Indexed Object Graph.md @@ -9,6 +9,10 @@ dependsOn: related: - "[[ADR/002 Sync Engine]]" - "[[ADR/005 Space Lua]]" +references: +- client/data/object_index.ts +- plugs/index/indexer.ts +- plugs/object-graph/src/graph_builder.ts --- # Context SilverBullet's power features — [[Space Lua/Integrated Query]], [[Linked Mention]], the [[Linked Tasks]], [[Object Graph]] — all need *structured, queryable* data. But the source of truth is plain markdown files. Something needs to turn that prose into queryable data without making the markdown any less plain. diff --git a/docs/ADR/004 Federation.md b/docs/ADR/004 Federation.md index d6071719..2c70741f 100644 --- a/docs/ADR/004 Federation.md +++ b/docs/ADR/004 Federation.md @@ -4,6 +4,9 @@ status: deprecated date: "2023-07-04" deciders: "[[Zef Hemel]]" owner: "[[Zef Hemel]]" +references: +- plug-api/lib/resolve.ts +- plug-api/syscalls/space.ts --- # Context Users wanted to reference and read pages from *other* spaces, shared libraries, public/published spaces without copying the content into their own. diff --git a/docs/ADR/005 Space Lua.md b/docs/ADR/005 Space Lua.md index 18aaf0a8..185e2373 100644 --- a/docs/ADR/005 Space Lua.md +++ b/docs/ADR/005 Space Lua.md @@ -7,6 +7,10 @@ owner: "[[Zef Hemel]]" lastReviewed: "2026-06-19" related: - "[[ADR/003 Indexed Object Graph]]" +references: +- client/space_lua.ts +- client/space_lua/runtime.ts +- client/space_lua/parse.ts --- # Context SilverBullet lets users put dynamic content: live queries, computed views, templated rendering, and custom logic directly in their pages. In v1 this was spread across **three separate mechanisms**, each with its own syntax: diff --git a/docs/ADR/006 Space Lua Integrated Query.md b/docs/ADR/006 Space Lua Integrated Query.md index defeee4a..bf93c7b0 100644 --- a/docs/ADR/006 Space Lua Integrated Query.md +++ b/docs/ADR/006 Space Lua Integrated Query.md @@ -7,6 +7,10 @@ owner: "[[Zef Hemel]]" dependsOn: - "[[ADR/005 Space Lua]]" - "[[ADR/003 Indexed Object Graph]]" +references: +- client/space_lua/query_collection.ts +- client/space_lua/query_env.ts +- client/space_lua/parse.ts --- # Context With [[ADR/005 Space Lua|Space Lua]] as the one embedded language and an [[ADR/003 Indexed Object Graph|object index]] to query, users still need an ergonomic way to *select and transform* objects, the single most common thing they do (RFC indexes, task rollups, dashboards). Plain imperative Lua (loops, filters, maps) works but reads poorly for what is fundamentally a declarative query, and a *separate* query language would reintroduce the second-language seam that adopting Lua removed. diff --git a/docs/ADR/007 Core Application Logic on the Client.md b/docs/ADR/007 Core Application Logic on the Client.md index 9653b82d..469510af 100644 --- a/docs/ADR/007 Core Application Logic on the Client.md +++ b/docs/ADR/007 Core Application Logic on the Client.md @@ -5,6 +5,10 @@ date: "2025-08-29" deciders: "[[Zef Hemel]]" owner: "[[Zef Hemel]]" lastReviewed: "2026-06-19" +references: +- client/client.ts +- client/client_system.ts +- client/service_worker.ts --- # Context SilverBullet's [[Plugs]] runtime was originally designed so that plugs could run **either on the server or in the client**. Through “v1” this surfaced as two switchable modes: diff --git a/docs/ADR/008 Go Backend.md b/docs/ADR/008 Go Backend.md index 0f618df5..50d1969f 100644 --- a/docs/ADR/008 Go Backend.md +++ b/docs/ADR/008 Go Backend.md @@ -8,6 +8,9 @@ dependsOn: - "[[ADR/007 Core Application Logic on the Client]]" supersededBy: - "[[ADR/010 Rust Backend]]" +references: +- server-common/src/space.rs +- bin/silverbullet/src/server.rs --- # Context The server had been a Deno-based TypeScript runtime since 2022. After [[ADR/007 Core Application Logic on the Client|v2 moved all logic to the client]], the server became a thin file store so the heavier, TypeScript-oriented Deno runtime bought little, and a leaner compiled server looked attractive. diff --git a/docs/ADR/009 Client Build Toolchain.md b/docs/ADR/009 Client Build Toolchain.md index 27286ae2..1723d471 100644 --- a/docs/ADR/009 Client Build Toolchain.md +++ b/docs/ADR/009 Client Build Toolchain.md @@ -9,6 +9,10 @@ dependsOn: - "[[ADR/007 Core Application Logic on the Client]]" related: - "[[ADR/010 Rust Backend]]" +references: +- build/build_client.ts +- build/build_plugs.ts +- client/asset_bundle/builder.ts --- # Context Since [[ADR/007 Core Application Logic on the Client|v2]] the client is where all the logic lives, and it is built with TypeScript + ESBuild. For years that toolchain ran on **Deno**, chosen early when Deno's sandboxed-worker permissions also suited running [[Plugs|plugs]] on the server (see [[ADR/010 Rust Backend]]). diff --git a/docs/ADR/010 Rust Backend.md b/docs/ADR/010 Rust Backend.md index acb37906..60da1909 100644 --- a/docs/ADR/010 Rust Backend.md +++ b/docs/ADR/010 Rust Backend.md @@ -10,6 +10,10 @@ dependsOn: related: - "[[ADR/009 Client Build Toolchain]]" - "[[ADR/002 Sync Engine]]" +references: +- bin/silverbullet/src/server.rs +- server-common/src/space.rs +- server-runtime-chrome/src/supervisor.rs --- # Context The server does very little. Since [[ADR/007 Core Application Logic on the Client|all application logic moved to the client]], the server is primarily a file store: it lists, reads, writes and deletes files, handles authentication, serves the static client, and runs shell commands. When the [[Runtime API]] is enabled, it manages a Chrome sub-process and delegates calls to it. This makes the server's *implementation language* a relatively low-stakes, swappable choice, and over the project’s life it has changed several times. diff --git a/docs/API.md b/docs/API.md index 1f574a71..62fba779 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,3 +1,9 @@ +--- +references: +- client/space_lua/stdlib.ts +- client/plugos/syscalls/index.ts +- plug-api/syscalls.ts +--- This describes the APIs available in [[Space Lua]]: # Lua Standard Library diff --git a/docs/API/asset.md b/docs/API/asset.md index 4f9aa75f..e226c8d4 100644 --- a/docs/API/asset.md +++ b/docs/API/asset.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/asset.ts +- client/plugos/syscalls/asset.ts +- client/asset_bundle/bundle.ts +--- The Asset API provides functions for reading and managing assets embedded in plugs. diff --git a/docs/API/clientStore.md b/docs/API/clientStore.md index 76997ef3..849e4a3b 100644 --- a/docs/API/clientStore.md +++ b/docs/API/clientStore.md @@ -1,4 +1,9 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/client_store.ts +- client/plugos/syscalls/clientStore.ts +--- The Client Store API provides a simple key-value store for client-specific states and preferences. diff --git a/docs/API/codeWidget.md b/docs/API/codeWidget.md index 2c4f7921..24a42831 100644 --- a/docs/API/codeWidget.md +++ b/docs/API/codeWidget.md @@ -1,4 +1,11 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/code_widget.ts +- client/plugos/syscalls/code_widget.ts +- client/plugos/syscalls/client_code_widget.ts +- client/codemirror/code_widget.ts +--- The Code Widget API provides functions for managing code widgets in the editor. diff --git a/docs/API/command.md b/docs/API/command.md index 46ac410b..b5768f78 100644 --- a/docs/API/command.md +++ b/docs/API/command.md @@ -1,3 +1,9 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- libraries/Library/Std/APIs/Command.md +- client/plugos/hooks/command.ts +- plugs/index/command.ts +--- See [[^Library/Std/APIs/Command]] \ No newline at end of file diff --git a/docs/API/config.md b/docs/API/config.md index ccbb71c2..2c967a2b 100644 --- a/docs/API/config.md +++ b/docs/API/config.md @@ -1,4 +1,11 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/config.ts +- client/plugos/syscalls/config.ts +- client/config.ts +- plugs/configuration-manager/configuration.ts +--- The Config API provides functions for managing configuration values, defining their JSON schemas, and exposing them in the [[Configuration Manager]] UI. diff --git a/docs/API/datastore.md b/docs/API/datastore.md index b418bf54..28102771 100644 --- a/docs/API/datastore.md +++ b/docs/API/datastore.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/datastore.ts +- client/plugos/syscalls/datastore.ts +- client/data/datastore.ts +--- The Datastore API provides functions for interacting with a key-value store that has query capabilities. diff --git a/docs/API/dom.md b/docs/API/dom.md index 70a3455c..256e5b6b 100644 --- a/docs/API/dom.md +++ b/docs/API/dom.md @@ -1,4 +1,9 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- libraries/Library/Std/APIs/DOM.md +- client/space_lua/render_widget.ts +--- An API to easily build DOM objects through the magic of Lua meta tables. diff --git a/docs/API/editor.md b/docs/API/editor.md index 7d468882..b0e89a56 100644 --- a/docs/API/editor.md +++ b/docs/API/editor.md @@ -1,4 +1,11 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/editor.ts +- client/plugos/syscalls/editor.ts +- plugs/editor/editor.ts +- plugs/editor/navigate.ts +--- The Editor API provides functions for interacting with the editor interface. diff --git a/docs/API/encoding.md b/docs/API/encoding.md index eae4c66c..77d26653 100644 --- a/docs/API/encoding.md +++ b/docs/API/encoding.md @@ -1,4 +1,8 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- client/space_lua/stdlib/encoding.ts +--- The `encoding` API implements a few useful functions to handle various types of encoding. diff --git a/docs/API/event.md b/docs/API/event.md index e5a578c3..0af03e18 100644 --- a/docs/API/event.md +++ b/docs/API/event.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/event.ts +- client/plugos/syscalls/event.ts +- client/plugos/event.ts +--- The Event API provides functions for working with SilverBullet's event bus system, allowing communication between different parts of the application. diff --git a/docs/API/global.md b/docs/API/global.md index 419bec7a..d3c7c9ec 100644 --- a/docs/API/global.md +++ b/docs/API/global.md @@ -1,4 +1,9 @@ -#api/lua +--- +tags: api/lua +references: +- client/space_lua/stdlib.ts +- client/space_lua/runtime.ts +--- These are Lua functions defined in the global namespace: diff --git a/docs/API/http.md b/docs/API/http.md index 6fc3600f..6a9e8b25 100644 --- a/docs/API/http.md +++ b/docs/API/http.md @@ -1,4 +1,9 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- client/space_lua/stdlib/net.ts +- plug-api/lib/native_fetch.ts +--- HTTP APIs diff --git a/docs/API/index.md b/docs/API/index.md index 0c4dc748..78c22108 100644 --- a/docs/API/index.md +++ b/docs/API/index.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/index.ts +- client/plugos/syscalls/index.ts +- client/data/object_index.ts +--- The `index` API provides convient functions for interacting with SilverBullet's [[Object Index]], allowing you to query indexed data. diff --git a/docs/API/js.md b/docs/API/js.md index dff7d362..9980f9ab 100644 --- a/docs/API/js.md +++ b/docs/API/js.md @@ -1,4 +1,8 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- client/space_lua/stdlib/js.ts +--- API docs for Space Lua's `js` module, which provides JavaScript interoperability. diff --git a/docs/API/jsonschema.md b/docs/API/jsonschema.md index a8051104..7dc7bea2 100644 --- a/docs/API/jsonschema.md +++ b/docs/API/jsonschema.md @@ -1,4 +1,9 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- plug-api/syscalls/jsonschema.ts +- client/plugos/syscalls/jsonschema.ts +--- The JSON Schema API provides functions for validating JSON objects against JSON schemas. diff --git a/docs/API/language.md b/docs/API/language.md index f1c89aec..3a6cdeb4 100644 --- a/docs/API/language.md +++ b/docs/API/language.md @@ -1,4 +1,9 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/language.ts +- client/plugos/syscalls/language.ts +--- The Language API provides functions for parsing code in various programming languages and listing supported languages. diff --git a/docs/API/lua.md b/docs/API/lua.md index 6820303b..aed240fc 100644 --- a/docs/API/lua.md +++ b/docs/API/lua.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/lua.ts +- client/plugos/syscalls/lua.ts +- client/space_lua_api.ts +--- The Lua API provides functions for parsing and evaluating Lua code. diff --git a/docs/API/markdown.md b/docs/API/markdown.md index 923d8a53..baf9f52a 100644 --- a/docs/API/markdown.md +++ b/docs/API/markdown.md @@ -1,4 +1,11 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/markdown.ts +- client/plugos/syscalls/markdown.ts +- client/markdown_renderer/markdown_render.ts +- client/markdown_parser/parser.ts +--- The Markdown API provides functions for parsing and rendering Markdown content. diff --git a/docs/API/math.md b/docs/API/math.md index 6dae57b2..92c8475e 100644 --- a/docs/API/math.md +++ b/docs/API/math.md @@ -1,4 +1,8 @@ -#api/lua +--- +tags: api/lua +references: +- client/space_lua/stdlib/math.ts +--- API docs for Lua's `math` module. diff --git a/docs/API/mq.md b/docs/API/mq.md index 2351fea9..1d312d6d 100644 --- a/docs/API/mq.md +++ b/docs/API/mq.md @@ -1,4 +1,10 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- plug-api/syscalls/mq.ts +- client/plugos/syscalls/mq.ts +- client/data/mq.datastore.ts +--- The Message Queue API provides functions for implementing a simple message queue system. diff --git a/docs/API/net.md b/docs/API/net.md index dc38356d..296962a8 100644 --- a/docs/API/net.md +++ b/docs/API/net.md @@ -1,4 +1,8 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- client/space_lua/stdlib/net.ts +--- Network-related APIs. diff --git a/docs/API/os.md b/docs/API/os.md index 520276f9..7ca6b3a4 100644 --- a/docs/API/os.md +++ b/docs/API/os.md @@ -1,4 +1,8 @@ -#api/lua +--- +tags: api/lua +references: +- client/space_lua/stdlib/os.ts +--- API docs for Lua's `os` module. diff --git a/docs/API/service.md b/docs/API/service.md index 9ac91798..88b2aaf8 100644 --- a/docs/API/service.md +++ b/docs/API/service.md @@ -1,4 +1,9 @@ -#api/syscall +--- +tags: api/syscall +references: +- client/service_registry.ts +- client/plugos/syscalls/service_registry.ts +--- Exposes a simple service registry API leveraged by various parts of SilverBullet, see [[Service]]. diff --git a/docs/API/shell.md b/docs/API/shell.md index fdeeed08..117af0b8 100644 --- a/docs/API/shell.md +++ b/docs/API/shell.md @@ -1,4 +1,9 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/shell.ts +- client/plugos/syscalls/shell.ts +--- The Shell API provides functions for running shell commands and interacting with processes. diff --git a/docs/API/slashCommand.md b/docs/API/slashCommand.md index 7858ee0f..9c139d7a 100644 --- a/docs/API/slashCommand.md +++ b/docs/API/slashCommand.md @@ -1,4 +1,10 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- libraries/Library/Std/APIs/Command.md +- client/plugos/hooks/slash_command.ts +- plug-api/types/manifest.ts +--- APIs to create [[Slash Command]]. For simple cases it is recommended to use [[Library/Std/Infrastructure/Slash Templates]] instead. diff --git a/docs/API/space.md b/docs/API/space.md index 8112ab2a..b9f81bd3 100644 --- a/docs/API/space.md +++ b/docs/API/space.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/space.ts +- client/plugos/syscalls/space.ts +- client/spaces/space_primitives.ts +--- The Space API provides functions for interacting with pages, documents, and files in the space. diff --git a/docs/API/spacelua.md b/docs/API/spacelua.md index 5bb2d3a9..aac95bd4 100644 --- a/docs/API/spacelua.md +++ b/docs/API/spacelua.md @@ -1,4 +1,10 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- client/space_lua.ts +- client/space_lua_api.ts +- client/space_lua/runtime.ts +--- The Space Lua API provides functions for working with Lua expressions and templates. diff --git a/docs/API/string.md b/docs/API/string.md index 8102cefd..2e0df842 100644 --- a/docs/API/string.md +++ b/docs/API/string.md @@ -1,4 +1,9 @@ -#api/lua +--- +tags: api/lua +references: +- client/space_lua/stdlib/string.ts +- client/space_lua/stdlib/string_pack.ts +--- API docs for Space Lua's `string` module. diff --git a/docs/API/sync.md b/docs/API/sync.md index e897ab60..afbb5764 100644 --- a/docs/API/sync.md +++ b/docs/API/sync.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/sync.ts +- client/plugos/syscalls/sync.ts +- client/spaces/sync.ts +--- The Sync API provides functions for interacting with the sync engine when the client runs in Sync mode. diff --git a/docs/API/syntax.md b/docs/API/syntax.md index 89acf17b..f556c905 100644 --- a/docs/API/syntax.md +++ b/docs/API/syntax.md @@ -1,4 +1,10 @@ -#api/space-lua #maturity/experimental +--- +tags: api/space-lua maturity/experimental +references: +- libraries/Library/Std/APIs/Syntax.md +- client/markdown_parser/custom_syntax.ts +- client/codemirror/custom_syntax_widget.ts +--- Enables defining simple custom syntax extensions to [[Markdown]]. Custom syntax lets you define new delimiter-based regions (both inline and block) that are recognized by the parser and can be styled or rendered as [[Space Lua/Widget|Widgets]]. diff --git a/docs/API/system.md b/docs/API/system.md index fb39f610..9d760865 100644 --- a/docs/API/system.md +++ b/docs/API/system.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/system.ts +- client/plugos/syscalls/system.ts +- plugs/editor/system.ts +--- The System API provides system-level functions for interacting with the SilverBullet environment. diff --git a/docs/API/table.md b/docs/API/table.md index d22813ce..e09903c6 100644 --- a/docs/API/table.md +++ b/docs/API/table.md @@ -1,4 +1,8 @@ -#api/lua +--- +tags: api/lua +references: +- client/space_lua/stdlib/table.ts +--- These are Lua functions defined in the `table` namespace. diff --git a/docs/API/tag.md b/docs/API/tag.md index be5866eb..3fcebce2 100644 --- a/docs/API/tag.md +++ b/docs/API/tag.md @@ -1,4 +1,10 @@ -#api/space-lua #maturity/experimental +--- +tags: api/space-lua maturity/experimental +references: +- libraries/Library/Std/APIs/Tag.md +- plugs/index/tags.ts +- client/data/object_index.ts +--- Enables customization of [[Tag|tags]] and its [[Object|objects]] in a few ways: diff --git a/docs/API/taskState.md b/docs/API/taskState.md index e33d3e82..fbd50c11 100644 --- a/docs/API/taskState.md +++ b/docs/API/taskState.md @@ -1,4 +1,10 @@ -#maturity/experimental #api/space-lua +--- +tags: maturity/experimental api/space-lua +references: +- libraries/Library/Std/APIs/Task State.md +- plugs/index/task.ts +- plugs/index/item.ts +--- APIs to define [[Task#Custom states]]. diff --git a/docs/API/template.md b/docs/API/template.md index 970fcd49..ecad972c 100644 --- a/docs/API/template.md +++ b/docs/API/template.md @@ -1,4 +1,9 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- libraries/Library/Std/APIs/Template.md +- client/space_lua/stdlib.ts +--- Template functions that use the [[API/template#template.new(template)]] function. diff --git a/docs/API/widget.md b/docs/API/widget.md index f3934e67..17cc09cf 100644 --- a/docs/API/widget.md +++ b/docs/API/widget.md @@ -1,4 +1,11 @@ -#api/space-lua +--- +tags: api/space-lua +references: +- libraries/Library/Std/APIs/Widget.md +- client/space_lua/render_widget.ts +- client/codemirror/lua_widget.ts +lastReviewed: "2026-06-29" +--- APIs to define widgets in SilverBullet, often used through [[Space Lua#Expressions]]. diff --git a/docs/API/yaml.md b/docs/API/yaml.md index eff0ce36..aa588e3a 100644 --- a/docs/API/yaml.md +++ b/docs/API/yaml.md @@ -1,4 +1,10 @@ -#api/syscall +--- +tags: api/syscall +references: +- plug-api/syscalls/yaml.ts +- plug-api/lib/yaml.ts +- plugs/index/yaml.ts +--- The YAML API provides functions for parsing and stringifying YAML content. diff --git a/docs/Anything Picker.md b/docs/Anything Picker.md index 2bd40295..ec87303c 100644 --- a/docs/Anything Picker.md +++ b/docs/Anything Picker.md @@ -1,3 +1,8 @@ +--- +references: +- client/components/anything_picker.tsx +- plugs/editor/complete.ts +--- The anything picker can be used to open any page, including [[Meta Page]] and pages hidden with [[Page Decorations]]. Otherwise it’s equivalent to the [[Page Picker]]. To open, run the command ${widgets.commandButton("Navigate: Anything Picker")} using this button or [[Command Palette]]. Alternatively cycle from any other Picker by typing `^`. diff --git a/docs/Architecture/Client Bundle Cache.md b/docs/Architecture/Client Bundle Cache.md index ffa83407..22b3ac5e 100644 --- a/docs/Architecture/Client Bundle Cache.md +++ b/docs/Architecture/Client Bundle Cache.md @@ -1,5 +1,9 @@ --- tags: component partOf: "[[Architecture/Service Worker]]" +references: +- client/asset_bundle/bundle.ts +- client/asset_bundle/builder.ts +- client/boot.ts --- The cached SilverBullet client code (JS, CSS, HTML) the [[Architecture/Service Worker]] serves so the app loads without the network. diff --git a/docs/Architecture/Client.md b/docs/Architecture/Client.md index 0a9188d1..b87bf0ec 100644 --- a/docs/Architecture/Client.md +++ b/docs/Architecture/Client.md @@ -2,5 +2,9 @@ tags: component connectsTo: - "[[Architecture/Service Worker]]" +references: +- client/client.ts +- client/editor_ui.tsx +- client/client_system.ts --- One instance per browser tab. The client renders the UI, interacts with the user, and runs **most of the logic** — 90%+ of SilverBullet lives here. It reaches the [[Architecture/Service Worker]] (and, when online, the [[Architecture/Server]] directly) through the [[HTTP API]]. diff --git a/docs/Architecture/Datastore.md b/docs/Architecture/Datastore.md index ac37f3be..cd385955 100644 --- a/docs/Architecture/Datastore.md +++ b/docs/Architecture/Datastore.md @@ -1,5 +1,9 @@ --- tags: component partOf: "[[Architecture/Client]]" +references: +- client/data/datastore.ts +- client/data/object_index.ts +- client/data/kv_primitives.ts --- An IndexedDB-backed key-value store — the client's local persistence layer. It holds the [[Object Index]] (enabling fast local [[Space Lua/Integrated Query|queries]]), the [[Sync]] file cache, runtime configuration, and the internal message queue. Wraps low-level KV primitives; exposed to extensions via [[API/datastore]]. diff --git a/docs/Architecture/Editor.md b/docs/Architecture/Editor.md index 93844922..44f9b31d 100644 --- a/docs/Architecture/Editor.md +++ b/docs/Architecture/Editor.md @@ -3,5 +3,9 @@ tags: component partOf: "[[Architecture/Client]]" connectsTo: - "[[Architecture/Syscalls]]" +references: +- client/document_editor.ts +- client/editor_commands.ts +- client/codemirror/editor_state.ts --- The editing surface, built on [CodeMirror](https://codemirror.net/) with many [[Markdown/Extensions]] to its default Markdown mode. See [[Editor]]. diff --git a/docs/Architecture/Events.md b/docs/Architecture/Events.md index a5ce0a89..d673323a 100644 --- a/docs/Architecture/Events.md +++ b/docs/Architecture/Events.md @@ -1,5 +1,9 @@ --- tags: component partOf: "[[Architecture/Client]]" +references: +- client/plugos/event.ts +- client/plugos/eventhook.ts +- client/plugos/hooks/event.ts --- The client-side [[Event]] bus that decouples components: code reacts to events (page loaded, file changed, sync status…) rather than calling each other directly. diff --git a/docs/Architecture/File System API.md b/docs/Architecture/File System API.md index 037a8094..7118979d 100644 --- a/docs/Architecture/File System API.md +++ b/docs/Architecture/File System API.md @@ -2,5 +2,9 @@ tags: component partOf: "[[Architecture/Server]]" consumes: "[[Architecture/Space Files]]" +references: +- server-common/src/space.rs +- server-common/src/space/disk.rs +- server-common/src/space/http.rs --- The server's file-access and RPC surface behind the [[HTTP API]]: listing/reading/writing/deleting files, plus shell execution and the HTTP proxy. diff --git a/docs/Architecture/Plugs.md b/docs/Architecture/Plugs.md index 7439806b..4dbf6663 100644 --- a/docs/Architecture/Plugs.md +++ b/docs/Architecture/Plugs.md @@ -3,5 +3,9 @@ tags: component partOf: "[[Architecture/Client]]" connectsTo: - "[[Architecture/Syscalls]]" +references: +- client/plugos/plug.ts +- client/plugos/plug_compile.ts +- plugs/builtin_plugs.ts --- [[Plugs]] (built on the PlugOS library) extend SilverBullet in TypeScript, compiled to a single `.plug.js` bundle and distributed via a [[Library]]. Each plug runs in its own Web Worker sandbox. A lot of "built-in" functionality is in fact implemented as plugs. diff --git a/docs/Architecture/Runtime Manager.md b/docs/Architecture/Runtime Manager.md index 881d56cd..bd5804c1 100644 --- a/docs/Architecture/Runtime Manager.md +++ b/docs/Architecture/Runtime Manager.md @@ -2,6 +2,10 @@ tags: component partOf: "[[Architecture/Server]]" consumes: "[[Architecture/Space Files]]" +references: +- server-runtime-chrome/src/supervisor.rs +- server-runtime-chrome/src/transport.rs +- server-runtime-chrome/src/lib.rs --- In order to implement the [[Runtime API]], diff --git a/docs/Architecture/Server.md b/docs/Architecture/Server.md index 8e2c5940..0b2837dd 100644 --- a/docs/Architecture/Server.md +++ b/docs/Architecture/Server.md @@ -1,4 +1,8 @@ --- tags: component +references: +- bin/silverbullet/src/server.rs +- server-common/src/space.rs +- server-common/src/space/http.rs --- The server has only three jobs: handle authentication, serve the (static) client code, and implement the [[HTTP API]] (list/read/write/delete files, run shell commands). All indexing and querying happens in the [[Architecture/Client]] — the server is effectively a file store. diff --git a/docs/Architecture/Service Worker.md b/docs/Architecture/Service Worker.md index 23c2ac19..3649522d 100644 --- a/docs/Architecture/Service Worker.md +++ b/docs/Architecture/Service Worker.md @@ -2,5 +2,9 @@ tags: component connectsTo: - "[[Architecture/Server]]" +references: +- client/service_worker.ts +- client/service_worker/proxy_router.ts +- client/service_worker/sync_engine.ts --- One instance per browser. The [service worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) makes SilverBullet offline-capable: it caches and serves the client code, embeds the [[Sync]] engine that keeps a local copy of your files, and implements the [[HTTP API]] locally by intercepting calls bound for the [[Architecture/Server]]. diff --git a/docs/Architecture/Services.md b/docs/Architecture/Services.md index 0a1a30fb..6f60d165 100644 --- a/docs/Architecture/Services.md +++ b/docs/Architecture/Services.md @@ -1,5 +1,8 @@ --- tags: component partOf: "[[Architecture/Client]]" +references: +- client/service_registry.ts +- client/plugos/syscalls/service_registry.ts --- Long-running, client-side service functionality invoked through [[Architecture/Syscalls]]. diff --git a/docs/Architecture/Space Files.md b/docs/Architecture/Space Files.md index 3c61c985..c175942c 100644 --- a/docs/Architecture/Space Files.md +++ b/docs/Architecture/Space Files.md @@ -1,5 +1,9 @@ --- tags: component partOf: "[[Architecture/Server]]" +references: +- client/spaces/space_primitives.ts +- server-common/src/space.rs +- server-common/src/space/disk.rs --- Your [[Space]]'s files on the server's file system — the canonical source of truth that the [[Architecture/Service Worker]] syncs from. diff --git a/docs/Architecture/Space Lua.md b/docs/Architecture/Space Lua.md index a0bb42cc..ea499c61 100644 --- a/docs/Architecture/Space Lua.md +++ b/docs/Architecture/Space Lua.md @@ -3,5 +3,9 @@ tags: component partOf: "[[Architecture/Client]]" connectsTo: - "[[Architecture/Syscalls]]" +references: +- client/space_lua.ts +- client/space_lua/runtime.ts +- client/space_lua/parse.ts --- SilverBullet's custom [[Lua]] runtime, [[Space Lua]] — the first-choice way to extend SilverBullet. It implements most of the Lua 5.4 standard library plus Space Lua-specific [[API]]s, and can reach all [[Architecture/Syscalls]]. diff --git a/docs/Architecture/Synced Files.md b/docs/Architecture/Synced Files.md index 8772aa72..e08bfe3c 100644 --- a/docs/Architecture/Synced Files.md +++ b/docs/Architecture/Synced Files.md @@ -1,5 +1,9 @@ --- tags: component partOf: "[[Architecture/Service Worker]]" +references: +- client/spaces/sync.ts +- client/service_worker/sync_engine.ts +- plugs/sync/sync.ts --- The local (IndexedDB) copy of all [[Space]] files the [[Sync]] engine keeps in step with the [[Architecture/Server]], enabling offline access. diff --git a/docs/Architecture/Syscalls.md b/docs/Architecture/Syscalls.md index e305b438..079f19b6 100644 --- a/docs/Architecture/Syscalls.md +++ b/docs/Architecture/Syscalls.md @@ -5,5 +5,9 @@ connectsTo: - "[[Architecture/Services]]" - "[[Architecture/Events]]" - "[[Architecture/Datastore]]" +references: +- plug-api/syscall.ts +- plug-api/syscalls.ts +- client/plugos/system.ts --- System calls — the API boundary between SilverBullet and extension code ([[Architecture/Plugs|Plugs]] or [[Architecture/Space Lua|Space Lua]]). Core functionality (editor, events, datastore) is exposed through syscalls. diff --git a/docs/Aspiring Pages.md b/docs/Aspiring Pages.md index d6988aef..0dc2fddc 100644 --- a/docs/Aspiring Pages.md +++ b/docs/Aspiring Pages.md @@ -1,6 +1,8 @@ --- description: An aspiring page is a page that does not yet exist, but is already linked to. tags: glossary +references: +- plugs/index/relation.ts --- An aspiring page is a [[Page|page]] that does not yet exist, but is already linked to. diff --git a/docs/Attribute.md b/docs/Attribute.md index 7f9e6bd9..313d2605 100644 --- a/docs/Attribute.md +++ b/docs/Attribute.md @@ -1,8 +1,10 @@ --- description: A key-value pair attached to a page or object, used for querying and filtering. tags: glossary +references: +- client/codemirror/attribute.ts +- plugs/index/attribute.ts --- - Attribute syntax can contribute additional [[Metadata]] to various [[Object|Objects]], including: * Pages (although the preferred way is [[Frontmatter]]) diff --git a/docs/Authentication.md b/docs/Authentication.md index ac4a88e2..ac946f87 100644 --- a/docs/Authentication.md +++ b/docs/Authentication.md @@ -1,4 +1,9 @@ -#getting-started +--- +tags: getting-started +references: +- bin/silverbullet/src/config.rs +- bin/silverbullet/src/server.rs +--- To be secure it is recommended you enable authentication. Here are the options. diff --git a/docs/Baked Sections.md b/docs/Baked Sections.md index 2b052f3f..04477180 100644 --- a/docs/Baked Sections.md +++ b/docs/Baked Sections.md @@ -1,3 +1,8 @@ +--- +references: +- client/baked_sections/bake.ts +- client/baked_sections/regions.ts +--- A baked section is a piece of dynamic content whose rendered output has been written *into* the page as plain [[Markdown]], wrapped in HTML comments so SilverBullet can keep it up to date while other tools just see the result. # Why diff --git a/docs/CLI.md b/docs/CLI.md index c53d0693..17f0dd2a 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -1,4 +1,10 @@ -#maturity/experimental +--- +tags: maturity/experimental +references: +- bin/sb/src/cli.rs +- bin/sb/src/commands/mod.rs +- bin/sb/src/main.rs +--- > **note** Not the server > `sb` is the optional **CLI client** — it talks to an already-running SilverBullet instance over HTTP. If you’re looking for the actual server binary, that’s [[Install/Binary]] (`silverbullet`), not this. You do not need `sb` to use SilverBullet. diff --git a/docs/Client Encryption.md b/docs/Client Encryption.md index a3e4b2c3..06776988 100644 --- a/docs/Client Encryption.md +++ b/docs/Client Encryption.md @@ -1,4 +1,10 @@ -#maturity/beta +--- +tags: maturity/beta +references: +- client/data/encrypted_kv_primitives.ts +- client/data/indexeddb_kv_primitives.ts +- client/data/kv_primitives.ts +--- By default SilverBullet keeps a copy of all your files as well as the index, unencrypted in your browser’s IndexedDB. As long as you control your device and other people do not have access to it, this should be perfectly safe. Browsers do not allow access to these databases from other websites and domains. diff --git a/docs/Command Palette.md b/docs/Command Palette.md index bcf93da9..798d8d9d 100644 --- a/docs/Command Palette.md +++ b/docs/Command Palette.md @@ -1,6 +1,8 @@ --- description: The searchable popup for running commands. tags: glossary +references: +- client/components/command_palette.tsx --- The Command Palette is used to explore SilverBullet’s numerous [[Command]] as well as execute them. diff --git a/docs/Command.md b/docs/Command.md index 9187b6ad..a364b91a 100644 --- a/docs/Command.md +++ b/docs/Command.md @@ -1,6 +1,9 @@ --- description: A named action you can invoke from the command palette or bind to a key. tags: glossary +references: +- libraries/Library/Std/APIs/Command.md +- client/plugos/hooks/command.ts --- Commands define actions that SilverBullet can perform. They range from simple edit commands, such as `Text: Bold`, but may be more elaborate such as `Page: Rename`. diff --git a/docs/Completion.md b/docs/Completion.md index 813525bb..d25b69b0 100644 --- a/docs/Completion.md +++ b/docs/Completion.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/editor/complete.ts +- plugs/index/complete.ts +--- SilverBullet provides context-aware autocomplete to help you write faster. Completions are triggered automatically or via keyboard shortcuts as you type. # Page link completion diff --git a/docs/Configuration Manager.md b/docs/Configuration Manager.md index 5220c004..125a61aa 100644 --- a/docs/Configuration Manager.md +++ b/docs/Configuration Manager.md @@ -1,3 +1,7 @@ +--- +references: +- plugs/configuration-manager/* +--- A built-in UI for editing your space's configuration without having to hand-edit [[Space Lua]] blocks in [[CONFIG]]. Launch it via the `Configuration: Open` command (`Cmd-,` or `Ctrl-,`). # Sections diff --git a/docs/Development.md b/docs/Development.md index 892a1e77..44232db6 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -1,4 +1,10 @@ -#development +--- +tags: development +references: +- Makefile +- build/build_client.ts +- build/build_plugs.ts +--- SilverBullet development can happen at various level. diff --git a/docs/Document Editor.md b/docs/Document Editor.md index 50c9e154..91a5265d 100644 --- a/docs/Document Editor.md +++ b/docs/Document Editor.md @@ -1,3 +1,8 @@ +--- +references: +- client/document_editor.ts +- client/document_editor_js.ts +--- Document editors allow you to not only view but also edit files other than markdown. By itself they are just [[Plugs|plugs]] which hook into Silverbullet and provide an editor based on the extension of the file. Silverbullet includes an image viewer by itself to view most image files (`jpg`, `png`, ...). If you are missing an editor and want to build your own look at [[#Development]]. # Usage diff --git a/docs/Event.md b/docs/Event.md index 5b8bb096..4e2ce411 100644 --- a/docs/Event.md +++ b/docs/Event.md @@ -1,6 +1,10 @@ --- description: A named signal that plugs and Lua scripts can listen to and react to. tags: glossary +references: +- client/plugos/event.ts +- plug-api/types/event.ts +- plug-api/syscalls/event.ts --- SilverBullet has its own event bus that allows different parts of the system to communicate. Events are the foundation for much of SilverBullet's extensibility — features like [[Service]], [[Virtual Pages]], widgets, and custom indexing are all built on top of events. diff --git a/docs/Export.md b/docs/Export.md index 3258ba35..afed4142 100644 --- a/docs/Export.md +++ b/docs/Export.md @@ -1,3 +1,7 @@ +--- +references: +- libraries/Library/Std/Infrastructure/Export.md +--- If you would like to export content (a full page or a selection), you can use SilverBullet’s _Export_ functionality triggered with ${widgets.commandButton "Export: Page Or Selection"}. **Note:** Exports are one-offs. If you are interested in sharing content onto other platforms and keeping things in sync, have a look at [[Share]]. diff --git a/docs/Frontmatter.md b/docs/Frontmatter.md index 34ee247d..816be8d0 100644 --- a/docs/Frontmatter.md +++ b/docs/Frontmatter.md @@ -2,6 +2,9 @@ description: A YAML block at the top of a page that sets page-level attributes. status: Complete tags: glossary +references: +- client/codemirror/frontmatter.ts +- plugs/index/frontmatter.ts --- Frontmatter is a common format to attach additional metadata (data about data) to markdown documents. Many tools support it as a markdown [[Markdown/Extensions|extension]]. diff --git a/docs/Guide/Task Management.md b/docs/Guide/Task Management.md index 5242acff..8bf317fb 100644 --- a/docs/Guide/Task Management.md +++ b/docs/Guide/Task Management.md @@ -1,4 +1,9 @@ -#guide +--- +tags: guide +references: +- plugs/index/task.ts +- libraries/Library/Std/APIs/Task State.md +--- This guide walks you through a project and task management workflow. You'll learn how tasks, frontmatter, linked tasks, and queries combine into a lightweight project tracker — no extra tools needed. diff --git a/docs/HTTP API.md b/docs/HTTP API.md index 8eda4c4c..9a4d541c 100644 --- a/docs/HTTP API.md +++ b/docs/HTTP API.md @@ -1,3 +1,8 @@ +--- +references: +- bin/silverbullet/src/server.rs +- server-common/src/space/http.rs +--- The server API is relatively small. The client primarily communicates with the server for file “CRUD” (Create, Read, Update, Delete) style operations. All API requests from the client will always set the `X-Sync-Mode` request header set to `true`. The server _will_ use this fact to distinguish between requests coming from the client and regular e.g. `GET` requests from the browser (through navigation) and redirect appropriately (for instance to the UI URL associated with a specific `.md` file). diff --git a/docs/Health.md b/docs/Health.md index ae2b197c..ee6ad992 100644 --- a/docs/Health.md +++ b/docs/Health.md @@ -22,3 +22,13 @@ ${some(query[[ * [[${p.name}]] — last reviewed _${p.lastReviewed}_ ]==]({p=p}) ]]) or "_Nothing overdue for review, nice job!_ 🥳"} + +# Code drift +Pages whose referenced source files changed after the page was last updated: + +${codeLink.healthMarkdown()} + +# Broken code links +`references:` entries that do not currently resolve to source files: + +${codeLink.referenceErrorsMarkdown()} diff --git a/docs/Install/Binary.md b/docs/Install/Binary.md index ee8b5517..53dfce4f 100644 --- a/docs/Install/Binary.md +++ b/docs/Install/Binary.md @@ -1,4 +1,9 @@ -#getting-started +--- +tags: getting-started +references: +- bin/silverbullet/src/main.rs +- bin/silverbullet/build.rs +--- SilverBullet is distributed as a single server binary available for the following platforms: diff --git a/docs/Install/Configuration.md b/docs/Install/Configuration.md index ac69b6d0..2d55e741 100644 --- a/docs/Install/Configuration.md +++ b/docs/Install/Configuration.md @@ -1,3 +1,8 @@ +--- +references: +- bin/silverbullet/src/config.rs +- bin/silverbullet/src/server.rs +--- SilverBullet is primarily configured via environment variables. This page gives a comprehensive overview of all configuration options. You can set these ad-hoc when running the SilverBullet server, or e.g. in your [[Install/Docker|docker-compose file]]. # General configuration diff --git a/docs/Install/Docker.md b/docs/Install/Docker.md index 0abd037b..8bf32757 100644 --- a/docs/Install/Docker.md +++ b/docs/Install/Docker.md @@ -1,4 +1,9 @@ -#getting-started +--- +tags: getting-started +references: +- Dockerfile +- docker-entrypoint.sh +--- [Docker](https://www.docker.com/) is a convenient and secure way to install server applications either locally or on a server you control. If you don’t have docker already running on your machine and are macOS user, consider giving [OrbStack](https://orbstack.dev/) a try — it’s a super nice docker experience. diff --git a/docs/Journal.md b/docs/Journal.md index d28683c2..75db1983 100644 --- a/docs/Journal.md +++ b/docs/Journal.md @@ -1,4 +1,9 @@ -#guide +--- +tags: guide +references: +- libraries/Library/Std/Journal/Journal.md +- libraries/Library/Std/Journal/Template.md +--- SilverBullet ships with basic support for (daily) journaling. Each day you get a fresh journal page (by running the `Journal: Today` command). On this page you can capture what’s happening throughout the day, typically as a bulleted list. By linking to (topic) pages from journal entries, those entries automatically appear on the topic page via [[Linked Mention|Linked Mentions]], building a timeline of activity for every topic you care about. You can freely mix this with a more [[Knowledge Base]] approach as you see fit. diff --git a/docs/Keyboard Shortcuts.md b/docs/Keyboard Shortcuts.md index 8b39ee3b..9ff930bc 100644 --- a/docs/Keyboard Shortcuts.md +++ b/docs/Keyboard Shortcuts.md @@ -1,4 +1,9 @@ -#customization +--- +tags: customization +references: +- plugs/configuration-manager/ui/components/shortcuts_tab.tsx +- plugs/editor/editor.ts +--- SilverBullet uses [CodeMirror](https://codemirror.net) under the hood, which does the majority of the keyboard handling. In addition, it allows to for customization of (most) keys on a per-command basis. When you open the [[Command Palette]], you will see the currently assigned keyboard shortcut(s). diff --git a/docs/Knowledge Base.md b/docs/Knowledge Base.md index b643f1a6..0a631945 100644 --- a/docs/Knowledge Base.md +++ b/docs/Knowledge Base.md @@ -1,4 +1,8 @@ -#guide +--- +tags: guide +references: +- libraries/Library/Std/Pages/Space Overview.md +--- This guide walks you through building a personal knowledge base with SilverBullet. You’ll learn how pages, links, tags, queries, and transclusions work together to create an interconnected web of knowledge. diff --git a/docs/Knowledge Database.md b/docs/Knowledge Database.md index d74d3425..5426b605 100644 --- a/docs/Knowledge Database.md +++ b/docs/Knowledge Database.md @@ -1,3 +1,8 @@ +--- +references: +- client/data/datastore.ts +- client/data/object_index.ts +--- A personal _knowledge database_ is a place where you not only _write things down_, but where everything you write may eventually become structured, linked and queryable data. In SilverBullet your notes are kept as a [[Space]] (folder) of [[Markdown]] [[Page|Pages]] on disk. As you write, SilverBullet continuously indexes your content — [[Page|pages]], [[Link|links]], [[Task|tasks]], list items and their [[Attribute|attributes]] — into queryable [[Object|Objects]]. You can then slice and reshape that data with [[Space Lua/Integrated Query|Queries]] (SLIQ) and surface the results right inside your notes. diff --git a/docs/Library.md b/docs/Library.md index 4008d51b..eb5092a3 100644 --- a/docs/Library.md +++ b/docs/Library.md @@ -1,6 +1,9 @@ --- description: A collection of reusable Space Lua scripts, templates, and pages that can be imported into your space. tags: maturity/beta glossary +references: +- plugs/configuration-manager/libraries.ts +- libraries/Library/Std/Infrastructure/Share.md --- SilverBullet is designed to be [[Extensions|extensible]]. In fact, a lot of functionality in SilverBullet is implemented through [[Space Lua]] embedded in [[Meta Page|Meta Pages]], other functionality is implemented using [[Plugs]]. diff --git a/docs/Library/Development.md b/docs/Library/Development.md index 18a64b4a..e1f87a8b 100644 --- a/docs/Library/Development.md +++ b/docs/Library/Development.md @@ -1,4 +1,9 @@ -#development +--- +tags: development +references: +- plugs/configuration-manager/libraries.ts +- libraries/Library/Std/Infrastructure/Github.md +--- To develop your own SilverBullet library follow these steps: diff --git a/docs/Library/Website Templates.md b/docs/Library/Website Templates.md index fa4e0809..69beb84f 100644 --- a/docs/Library/Website Templates.md +++ b/docs/Library/Website Templates.md @@ -1,4 +1,8 @@ -#meta +--- +tags: meta +references: +- libraries/Library/Std/Infrastructure/Share.md +--- A few templates used on the https://silverbullet.md website. diff --git a/docs/Library/Website.md b/docs/Library/Website.md index 3a41384d..dd988cab 100644 --- a/docs/Library/Website.md +++ b/docs/Library/Website.md @@ -1,4 +1,8 @@ -#meta +--- +tags: meta +references: +- libraries/Library/Std/Infrastructure/Share.md +--- Some silverbullet.md specific widgets etc. diff --git a/docs/Library/silverbullet-diagram/Mermaid.md b/docs/Library/silverbullet-diagram/Mermaid.md index dc558b27..03b06a2f 100644 --- a/docs/Library/silverbullet-diagram/Mermaid.md +++ b/docs/Library/silverbullet-diagram/Mermaid.md @@ -4,6 +4,8 @@ tags: meta/library share.uri: "github:silverbulletmd/silverbullet-diagram@main/Mermaid.md" share.hash: "54928563" share.mode: pull +references: +- docs/Library/silverbullet-diagram/Mermaid.md --- This is a pure [Space Lua](https://silverbullet.md) library that adds [Mermaid](https://mermaid.js.org/) support to SilverBullet. diff --git a/docs/Link.md b/docs/Link.md index 1ab3135c..0b5bc96d 100644 --- a/docs/Link.md +++ b/docs/Link.md @@ -1,6 +1,10 @@ --- description: A wiki-link or Markdown link connecting pages in your space. tags: glossary +references: +- client/codemirror/wiki_link.ts +- client/codemirror/wiki_link_processor.ts +- plug-api/lib/ref.ts --- In SilverBullet, you can create links to pages or documents inside your space as well as to external resources, using different link formats. diff --git a/docs/Linked Mention.md b/docs/Linked Mention.md index 59ce61a6..dc11d3b6 100644 --- a/docs/Linked Mention.md +++ b/docs/Linked Mention.md @@ -1,6 +1,8 @@ --- description: A backlink reference showing everywhere a page is linked from. tags: glossary +references: +- plugs/index/relation.ts --- Linked mentions (also known as backlinks) show all pages that contain a [[Link|link]] to the current page. They appear as a "Linked Mentions" section at the bottom of every page that has incoming links. diff --git a/docs/Linked Tasks.md b/docs/Linked Tasks.md index c1e8960b..109c2c21 100644 --- a/docs/Linked Tasks.md +++ b/docs/Linked Tasks.md @@ -1,6 +1,9 @@ --- description: Tasks that reference a specific page using a link. tags: glossary +references: +- plugs/index/task.ts +- plugs/index/relation.ts --- It is a common SilverBullet pattern to give people, groups of people and places dedicated pages so you can easily reference them. It then becomes very convenient to mention these pages elsewhere in your space, and using [[Linked Mention]] you can easily find what _pages_ link back to that page. diff --git a/docs/Live Preview.md b/docs/Live Preview.md index d6273f3c..9d8a217b 100644 --- a/docs/Live Preview.md +++ b/docs/Live Preview.md @@ -1,6 +1,8 @@ --- description: The inline rendering of Markdown formatting as you type. tags: glossary +references: +- client/markdown_renderer/markdown_render.ts --- SilverBullet uses a “live preview” markdown editor. This mechanism is heavily inspired by [Obsidian's live preview mode](https://obsidian.md/help/edit-and-read#Live+Preview). diff --git a/docs/Local First.md b/docs/Local First.md index 1b050ab5..af7ddb4d 100644 --- a/docs/Local First.md +++ b/docs/Local First.md @@ -2,6 +2,9 @@ description: SilverBullet synchronizes all your content locally, allowing full access even when not connected to (reliable) Internet. awesomeness: 7 tags: feature +references: +- client/service_worker.ts +- client/spaces/sync.ts --- From the original [Local First](https://www.inkandswitch.com/essay/local-first/) article: diff --git a/docs/Markdown.md b/docs/Markdown.md index 4e6a25af..02cc0cb2 100644 --- a/docs/Markdown.md +++ b/docs/Markdown.md @@ -1,3 +1,8 @@ +--- +references: +- client/markdown_parser/parser.ts +- client/markdown_renderer/markdown_render.ts +--- Markdown is a plain text formatting system [originally developed by John Gruber](https://daringfireball.net/projects/markdown/). It has since been standardized into [CommonMark](https://commonmark.org/), which is what SilverBullet uses (with [[Markdown/Extensions]]). While a bit more technical than [WYSIWYG](https://pl.wikipedia.org/wiki/WYSIWYG)-style editing (like MS Word), the nice thing about markdown is that it is a relatively easy-to-learn format, and you can read files even without special tools (like SilverBullet). This means that _you will always have access to your content_ even if you switch tools. It also means that you can use multiple tools at the same time to edit these files. You don’t have to use SilverBullet exclusively. diff --git a/docs/Markdown/Admonition.md b/docs/Markdown/Admonition.md index 62214bc2..05cc271a 100644 --- a/docs/Markdown/Admonition.md +++ b/docs/Markdown/Admonition.md @@ -1,6 +1,9 @@ --- description: A callout block rendered from a special blockquote syntax. tags: level/intermediate glossary +references: +- client/markdown_parser/custom_syntax.ts +- client/markdown_renderer/markdown_render.ts --- Silverbullet supports [admonitions](https://github.com/community/community/discussions/16925) using GitHub syntax (`note` and `warning`). diff --git a/docs/Markdown/Anchor.md b/docs/Markdown/Anchor.md index 76990957..3bcae88f 100644 --- a/docs/Markdown/Anchor.md +++ b/docs/Markdown/Anchor.md @@ -1,6 +1,9 @@ --- description: "An inline $anchor that gives an object a space-globally unique name." tags: glossary maturity/experimental +references: +- plugs/index/anchor.ts +- client/markdown_parser/constants.ts --- Anchor syntax (`$my-anchor`) gives the containing [[Object]] a stable, (potentially) meaningful, space-globally unique name. That name becomes the object's `ref`, and it can be linked to from any page using `[[$my-anchor]]`. diff --git a/docs/Markdown/Basics.md b/docs/Markdown/Basics.md index cb7f51f7..f8734727 100644 --- a/docs/Markdown/Basics.md +++ b/docs/Markdown/Basics.md @@ -1,3 +1,8 @@ +--- +references: +- client/markdown_parser/parser.ts +- client/markdown_renderer/markdown_render.ts +--- The idea of markdown is that you write plain text with some additional markup that even without further processing (like rendering it to HTML, or [[Live Preview]]) you could just read and understand. It was inspired by conventions used in plain-text e-mails, before e-mail supported rich formatting. # Basic markup diff --git a/docs/Markdown/Extensions.md b/docs/Markdown/Extensions.md index d7a36b5b..74eb8e78 100644 --- a/docs/Markdown/Extensions.md +++ b/docs/Markdown/Extensions.md @@ -1,3 +1,8 @@ +--- +references: +- client/markdown_parser/custom_syntax.ts +- client/markdown_parser/parser.ts +--- In addition to supporting [[Markdown/Basics|markdown basics]] as standardized by [CommonMark](https://commonmark.org/), SilverBullet relies on the following extensions: * [[Link]] diff --git a/docs/Markdown/Fenced Code Block.md b/docs/Markdown/Fenced Code Block.md index 260289ab..20289a93 100644 --- a/docs/Markdown/Fenced Code Block.md +++ b/docs/Markdown/Fenced Code Block.md @@ -1,6 +1,9 @@ --- description: A triple-backtick block that can render widgets, queries, or syntax-highlighted code. tags: glossary +references: +- client/codemirror/fenced_code.ts +- client/markdown_parser/parser.ts --- Blocks use the fenced code block notation of [[Markdown]], and assign special behavior to it. diff --git a/docs/Markdown/Footnotes.md b/docs/Markdown/Footnotes.md index 2ecc3f95..a568bef3 100644 --- a/docs/Markdown/Footnotes.md +++ b/docs/Markdown/Footnotes.md @@ -1,5 +1,8 @@ --- description: Reference-style and inline footnotes. +references: +- client/markdown_parser/footnote.ts +- client/codemirror/footnote.ts --- SilverBullet supports footnotes in two flavors: classic **reference-style** footnotes and **inline** footnotes. Both are rendered as a small widget in [[Live Preview]] and show their content on hover. diff --git a/docs/Markdown/HTML.md b/docs/Markdown/HTML.md index 33fef069..3eefd3a9 100644 --- a/docs/Markdown/HTML.md +++ b/docs/Markdown/HTML.md @@ -1,6 +1,9 @@ --- description: Inline and block-level HTML tags inside markdown. tags: level/intermediate glossary +references: +- client/markdown_parser/html_block.ts +- client/codemirror/html_element.ts --- SilverBullet supports embedding raw HTML tags inside your markdown — both **inline** (mid-paragraph, in headings, in table cells) and **block-level** (HTML on its own lines). As with other [[Live Preview]] features, it is rendered live in the editor when the cursor is outside the tag, and falls back to raw source when the cursor enters it. Markdown inside the HTML tag is parsed and rendered too. diff --git a/docs/Markdown/Hashtags.md b/docs/Markdown/Hashtags.md index 6c2179aa..2dcf9d17 100644 --- a/docs/Markdown/Hashtags.md +++ b/docs/Markdown/Hashtags.md @@ -1,6 +1,9 @@ --- +tags: glossary page-tag-example description: "An inline #tag that annotates a page or object for categorisation and querying." -tags: glossary +references: +- client/codemirror/hashtag.ts +- plugs/index/tags.ts --- Hashtag syntax (`#my-tag`) can be used to explicitly assign a [[Tag]] to an [[Object]]. @@ -13,7 +16,6 @@ Hashtag syntax (`#my-tag`) can be used to explicitly assign a [[Tag]] to an [[Ob * If you create a [[Markdown/Fenced Code Block]] with a hashtag as language, it applies the tag to that [[Object/data]]. ## Examples -#page-tag-example Paragraph #paragraph-tag-example diff --git a/docs/Markdown/Syntax Highlighting.md b/docs/Markdown/Syntax Highlighting.md index c0397e41..1490437f 100644 --- a/docs/Markdown/Syntax Highlighting.md +++ b/docs/Markdown/Syntax Highlighting.md @@ -1,3 +1,8 @@ +--- +references: +- client/codemirror/fenced_code.ts +- client/languages.ts +--- SilverBullet comes with syntax highlighters for various programming languages. This page demonstrates some: ```yaml diff --git a/docs/Meta Page.md b/docs/Meta Page.md index fa2ce086..65534953 100644 --- a/docs/Meta Page.md +++ b/docs/Meta Page.md @@ -1,6 +1,8 @@ --- description: "A page tagged with #meta that serves as tooling (configuration, extensions, templates) rather than regular content." tags: glossary +references: +- plugs/index/page.ts --- Meta pages are pages not core to your content, but function as a way to configure, or extend your [[Space]]. You can think of them as “tooling” pages. diff --git a/docs/Meta Picker.md b/docs/Meta Picker.md index 4a1c29dc..52db7e88 100644 --- a/docs/Meta Picker.md +++ b/docs/Meta Picker.md @@ -1 +1,5 @@ +--- +references: +- client/components/anything_picker.tsx +--- The meta picker is used to navigate between [[Meta Page]]. Functionally it’s equivalent to the [[Page Picker]] except that it only shows pages tagged with a `meta` tag prefix. diff --git a/docs/Metadata.md b/docs/Metadata.md index cac4854a..d9e41153 100644 --- a/docs/Metadata.md +++ b/docs/Metadata.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/frontmatter.ts +- plugs/index/attribute.ts +--- Metadata is data about data. Most [[Object|objects]] have a set of default attributes that can be augmented in a few additional ways: * [[Tag]]: to tag the object (and add to the `tags` attribute directly) diff --git a/docs/Names.md b/docs/Names.md index c397e0d3..8de3d14b 100644 --- a/docs/Names.md +++ b/docs/Names.md @@ -1,3 +1,8 @@ +--- +references: +- plug-api/lib/ref.ts +- plugs/index/refactor.ts +--- In [[SilverBullet]] every [[Page|page]] or [[Document|document]] has a name. Names are (currently) unique, meaning no two pages or documents can share the same name. # Rules diff --git a/docs/Object Graph.md b/docs/Object Graph.md index a3591800..29240263 100644 --- a/docs/Object Graph.md +++ b/docs/Object Graph.md @@ -1,4 +1,8 @@ -#maturity/experimental +--- +tags: maturity/experimental +references: +- plugs/object-graph/* +--- An interactive object-graph explorer visualizes [[Object|objects]] (pages, items, blocks) and the typed [[Object/relation|relations]] between them — letting you navigate your space by structure rather than by name. diff --git a/docs/Object Index.md b/docs/Object Index.md index 63b9e93d..4b497150 100644 --- a/docs/Object Index.md +++ b/docs/Object Index.md @@ -1,6 +1,10 @@ --- description: The local index that makes objects queryable. tags: glossary +references: +- client/data/object_index.ts +- plugs/index/* +- plug-api/syscalls/index.ts --- The Object Index stores [[Object|Objects]] found in your [[Space]]. diff --git a/docs/Object.md b/docs/Object.md index f43f8f43..a195fd1c 100644 --- a/docs/Object.md +++ b/docs/Object.md @@ -1,6 +1,10 @@ --- description: A structured, queryable unit of data extracted from your pages (e.g. tasks, items, paragraphs). tags: glossary +references: +- client/data/object_index.ts +- plugs/index/indexer.ts +- plug-api/types/index.ts --- SilverBullet automatically maintains an [[Object Index]] extracted from all [[Markdown]] [[Page|pages]] in your [[Space|Space]]. diff --git a/docs/Object/anchor.md b/docs/Object/anchor.md index 7bb450e8..0951b02e 100644 --- a/docs/Object/anchor.md +++ b/docs/Object/anchor.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/anchor.ts +- plugs/index/resolve_anchor.test.ts +--- Every [[Markdown/Anchor]] (`$name`) defined in your [[Space]] also produces a small `anchor`-tagged object that maps the anchor name to the host object's location. The host object itself (paragraph, task, header, item, or any user-defined `#tag` object) keeps its own record but with `ref` overridden to the anchor name. The dedicated `anchor` record carries only enough information to look the host up: diff --git a/docs/Object/aspiring-page.md b/docs/Object/aspiring-page.md index 600951ca..75073a64 100644 --- a/docs/Object/aspiring-page.md +++ b/docs/Object/aspiring-page.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/relation.ts +- client/data/object_index.ts +--- [[Aspiring Pages]] (codified using the `aspiring-page` tag) are pages that are linked to, but not yet created. [[Like this one]]. Internally SilverBullet uses these in [[^Library/Std/Pages/Maintenance]], page complete and the page picker (to hint at pages to still be created). diff --git a/docs/Object/data.md b/docs/Object/data.md index b39642a2..b3aea10c 100644 --- a/docs/Object/data.md +++ b/docs/Object/data.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/data.ts +- plugs/index/yaml.ts +--- You can also embed arbitrary YAML data blocks in pages via fenced code blocks and use a tag as a coding language, e.g. ```#contact diff --git a/docs/Object/document.md b/docs/Object/document.md index a788fc94..2bb5a9b5 100644 --- a/docs/Object/document.md +++ b/docs/Object/document.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/document.ts +- server-common/src/types.rs +--- Every non-page file in your space (images, PDFs, attachments, etc.) is available via the `document` tag, they’re indexed purely from filesystem metadata. The `document` tag exposes the following attributes: diff --git a/docs/Object/header.md b/docs/Object/header.md index db483083..e417f41a 100644 --- a/docs/Object/header.md +++ b/docs/Object/header.md @@ -1,3 +1,7 @@ +--- +references: +- plugs/index/header.ts +--- Headers (lines starting with `#`, `##` etc.) are indexed as well and queryable via the `header` tag. ### Test header diff --git a/docs/Object/item.md b/docs/Object/item.md index 0dedc50a..64be33db 100644 --- a/docs/Object/item.md +++ b/docs/Object/item.md @@ -1,3 +1,7 @@ +--- +references: +- plugs/index/item.ts +--- List items (both bullet point and numbered items) are indexed with the `item` tag, additional tags can be added using [[Tag]]. Here is an example of a #quote item using a custom [[Attribute|attribute]]: diff --git a/docs/Object/link.md b/docs/Object/link.md index be272860..66d3b32b 100644 --- a/docs/Object/link.md +++ b/docs/Object/link.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/link.ts +- plugs/index/relation.ts +--- All page _links_ are tagged with `link`. You cannot attach additional tags to links. The main two attributes of a link are: * `toPage` the page the link is linking _to_ diff --git a/docs/Object/page.md b/docs/Object/page.md index 92aefd07..7c509378 100644 --- a/docs/Object/page.md +++ b/docs/Object/page.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/page.ts +- client/data/object_index.ts +--- Every page in your space is available via the `page` tag. You can attach _additional_ tags to a page, by either specifying them in the `tags` attribute [[Frontmatter]], or by putting additional [[Tag|tags]] in a standalone paragraph with no other (textual) content in them. In addition to `ref` and `tags`, the `page` tag defines a bunch of additional attributes as can be seen in this example query: diff --git a/docs/Object/paragraph.md b/docs/Object/paragraph.md index f5348b32..b4010e5a 100644 --- a/docs/Object/paragraph.md +++ b/docs/Object/paragraph.md @@ -1,3 +1,7 @@ +--- +references: +- plugs/index/paragraph.ts +--- Top-level paragraphs (that is: paragraphs not embedded in a list) are indexed using the `paragraph` tag, any additional tags can be added using [[Tag]]. By default, paragraphs are only indexed when they contain a tag. However, you can enable indexing _all_ paragraphs by adding the following to your [[CONFIG]]: diff --git a/docs/Object/relation.md b/docs/Object/relation.md index 7a2f1aea..139447be 100644 --- a/docs/Object/relation.md +++ b/docs/Object/relation.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/relation.ts +- plugs/object-graph/src/graph_builder.ts +--- Relation objects represent typed and untyped relationships between indexed [[Object|objects]] in the space. They are the source of truth for relationship queries (graph views, backlinks of non-page objects, typed-attribute edges). The legacy [[Object/link]] collection is now a virtual projection over `relation`. ## Attributes diff --git a/docs/Object/space-lua.md b/docs/Object/space-lua.md index 82f84e6b..a20bcc20 100644 --- a/docs/Object/space-lua.md +++ b/docs/Object/space-lua.md @@ -1 +1,6 @@ +--- +references: +- plugs/index/space_lua.ts +- client/space_lua.ts +--- Every `space-lua` block across your space is indexed with the `space-lua` tag. Upon client boot (or after using `System: Reload`), all space lua scripts are executed in sequence. \ No newline at end of file diff --git a/docs/Object/table.md b/docs/Object/table.md index e0a91288..2bec8a13 100644 --- a/docs/Object/table.md +++ b/docs/Object/table.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/table.ts +- client/markdown_parser/table_parser.ts +--- Markdown table rows are indexed using the `table` tag, any additional tags can be added using [[Tag]] in any of its cells. | Title | Description Text | diff --git a/docs/Object/tag.md b/docs/Object/tag.md index 61867e81..14ae1791 100644 --- a/docs/Object/tag.md +++ b/docs/Object/tag.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/tags.ts +- libraries/Library/Std/APIs/Tag.md +--- The ultimate meta tag is `tag` itself, which indexes for all tags used, in which page they appear and what their “parent tag” is (the context of the tag: either `page`, `item` or `task`). Here are the tags used/defined in this space: diff --git a/docs/Object/task.md b/docs/Object/task.md index 5254d023..fc74a6b9 100644 --- a/docs/Object/task.md +++ b/docs/Object/task.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/task.ts +- client/codemirror/task.ts +--- Every task in your space is tagged with the `task` tag by default. You tag it with additional tags by using [[Tag]] in the task name, e.g. * [ ] My task #upnext diff --git a/docs/Outlines.md b/docs/Outlines.md index fd030a01..cddb7bae 100644 --- a/docs/Outlines.md +++ b/docs/Outlines.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/editor/outline.ts +- plugs/editor/outline_ops.ts +--- While SilverBullet is not a “proper” outliner like e.g. [LogSeq](https://logseq.com), it does offer useful commands to manage outlines. An outline is simply a (nested) bulleted list, for instance: diff --git a/docs/PWA.md b/docs/PWA.md index fb9c8283..43d851a2 100644 --- a/docs/PWA.md +++ b/docs/PWA.md @@ -1,6 +1,9 @@ --- description: "SilverBullet's installable web-app mode for offline access and native-like experience." tags: glossary +references: +- client/service_worker.ts +- client/boot.ts --- SilverBullet is built as a [Progressive Web App](https://web.dev/progressive-web-apps/) (PWA) — a web application that works fully offline. diff --git a/docs/Page Decorations.md b/docs/Page Decorations.md index c1c0fd5d..7ffec197 100644 --- a/docs/Page Decorations.md +++ b/docs/Page Decorations.md @@ -6,6 +6,8 @@ pageDecoration: disableTOC: true cssClasses: - christmas-decoration +references: +- plugs/index/page.ts --- Page decorations allow you to “decorate” pages in various fun ways. diff --git a/docs/Page Namer.md b/docs/Page Namer.md index 4bb6c32d..4d022567 100644 --- a/docs/Page Namer.md +++ b/docs/Page Namer.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/editor/page.ts +- plug-api/lib/ref.ts +--- At the header of each page, you see the currently open page name. Let’s call this user interface element the “Page Namer.” This element of the user interface serves a few roles: * It indicates the **currently open name** (duh) diff --git a/docs/Page Picker.md b/docs/Page Picker.md index add3bf4b..6db714ea 100644 --- a/docs/Page Picker.md +++ b/docs/Page Picker.md @@ -1,6 +1,9 @@ --- description: The quick-open dialog for navigating to any page. tags: glossary +references: +- client/components/anything_picker.tsx +- plugs/editor/page.ts --- The page picker has two main functions: diff --git a/docs/Page Template.md b/docs/Page Template.md index 83e5dd38..3e244e3f 100644 --- a/docs/Page Template.md +++ b/docs/Page Template.md @@ -1,6 +1,9 @@ --- description: A template used to pre-populate new pages. tags: glossary +references: +- libraries/Library/Std/Infrastructure/Page Templates.md +- libraries/Library/Std/Page Templates/Page Template.md --- Page templates can be used to automate or simplify the creation of pages based on a template. diff --git a/docs/Paths.md b/docs/Paths.md index 0297c41e..f31f4565 100644 --- a/docs/Paths.md +++ b/docs/Paths.md @@ -1,3 +1,8 @@ +--- +references: +- plug-api/lib/ref.ts +- plug-api/lib/resolve.ts +--- Every document or page in SilverBullet is identified by a path. The path represents the location where the corresponding page or document is stored inside your space folder. Paths are always absolute and always have to end in an [[#Extensions|extension]]. # Extensions diff --git a/docs/Plugs.md b/docs/Plugs.md index 150b7133..9e781c84 100644 --- a/docs/Plugs.md +++ b/docs/Plugs.md @@ -1,3 +1,8 @@ +--- +references: +- client/plugos/* +- plugs/builtin_plugs.ts +--- SilverBullet at its core is bare bones in terms of functionality, most of its power it gains from **plugs** and [[Space Lua]]. Plugs are an extension mechanism that runs “plug” code in the browser using [web workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers). diff --git a/docs/Plugs/Development.md b/docs/Plugs/Development.md index 5c45470b..29b00dc5 100644 --- a/docs/Plugs/Development.md +++ b/docs/Plugs/Development.md @@ -1,3 +1,9 @@ +--- +references: +- client/plugos/plug_compile.ts +- plug-api/types/manifest.ts +- bin/plug-compile.ts +--- A **plug** is a self-contained JavaScript bundle (`*.plug.js`) that extends SilverBullet. It runs inside a sandboxed [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers), talks to the editor via [[API|syscalls]], and hooks into SilverBullet through commands, events, slash commands, message queues, and more. A big chunk of SilverBullet itself is implemented as a mix of [[Space Lua]] and built-in plugs, so it’s also worth exploring [built-in plugs source code](https://github.com/silverbulletmd/silverbullet/tree/main/plugs) to get a feel for how things work. diff --git a/docs/Plugs/Development/Architecture.md b/docs/Plugs/Development/Architecture.md index afbb368b..2b33cdc3 100644 --- a/docs/Plugs/Development/Architecture.md +++ b/docs/Plugs/Development/Architecture.md @@ -1,3 +1,9 @@ +--- +references: +- client/plugos/plug.ts +- client/plugos/sandboxes/worker_sandbox.ts +- client/plugos/manifest_cache.ts +--- This page explains how plugs are loaded, executed, and isolated within SilverBullet. If you just want to build a plug, you can skip ahead to [[Plugs/Development/Reference]] and come back here when you need to understand *why* something behaves the way it does. # Runtime model diff --git a/docs/Plugs/Development/Distribution and Testing.md b/docs/Plugs/Development/Distribution and Testing.md index 167155a2..54141f7d 100644 --- a/docs/Plugs/Development/Distribution and Testing.md +++ b/docs/Plugs/Development/Distribution and Testing.md @@ -1,3 +1,9 @@ +--- +references: +- bin/plug-compile.ts +- build/build_plugs.ts +- plug-api/system_mock.ts +--- Once your plug works locally, you probably want to ship it to other people. This page covers both. # Distribution: ship your plug in a Library diff --git a/docs/Plugs/Development/Reference.md b/docs/Plugs/Development/Reference.md index b1eb7b5d..bbdc3485 100644 --- a/docs/Plugs/Development/Reference.md +++ b/docs/Plugs/Development/Reference.md @@ -1,3 +1,9 @@ +--- +references: +- plug-api/types/manifest.ts +- client/plugos/hooks/command.ts +- client/plugos/hooks/syscall.ts +--- This page is the reference surface for plug authors: the `*.plug.yaml` manifest, every hook type, and the full syscall catalog. # Manifest diff --git a/docs/Programmable.md b/docs/Programmable.md index f7f995e1..e1d1d082 100644 --- a/docs/Programmable.md +++ b/docs/Programmable.md @@ -2,6 +2,9 @@ description: SilverBullet has been designed to be programmable from the ground up. awesomeness: 10 tags: feature +references: +- client/space_lua.ts +- client/plugos/plug.ts --- SilverBullet has been designed to be programmable from the ground up. The core of SilverBullet is relatively small, see [[Architecture]]. diff --git a/docs/Repository.md b/docs/Repository.md index 60018039..6702f6d9 100644 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -1,4 +1,9 @@ -#maturity/beta +--- +tags: maturity/beta +references: +- plugs/configuration-manager/libraries.ts +- libraries/Library/Std/Infrastructure/Share.md +--- Repositories are a collection of _pointers_ to [[Library|Libraries]] to install. Their purpose is to offer a curated list of libraries to install. diff --git a/docs/Runtime API.md b/docs/Runtime API.md index d4dd0915..eebe25d2 100644 --- a/docs/Runtime API.md +++ b/docs/Runtime API.md @@ -1,4 +1,10 @@ -#maturity/experimental +--- +tags: maturity/experimental +references: +- bin/silverbullet/src/server.rs +- bin/sb/src/commands/query.rs +- client/runtime_api/objects_api.ts +--- The Runtime API lets you interact with SilverBullet programmatically over HTTP: evaluate Lua expressions and run scripts from the command line, scripts, or external tools. diff --git a/docs/Schema.md b/docs/Schema.md index 8bb796d2..f4228156 100644 --- a/docs/Schema.md +++ b/docs/Schema.md @@ -1,6 +1,10 @@ --- description: A definition that validates and constrains the shape of object attributes. tags: glossary +references: +- plug-api/syscalls/jsonschema.ts +- client/plugos/syscalls/jsonschema.ts +- libraries/Library/Std/APIs/Schema.md --- SilverBullet uses [JSON Schema](https://json-schema.org) for validation of structured data. Schemas ensure that [[Frontmatter]] attributes, [[Tag#Custom tags|custom tag]] fields, and configuration options conform to expected types and shapes. diff --git a/docs/Self Hosted.md b/docs/Self Hosted.md index 478a0d06..d8d43d65 100644 --- a/docs/Self Hosted.md +++ b/docs/Self Hosted.md @@ -2,6 +2,9 @@ description: Rather than relying on the servers of a third-party provider, you run SilverBullet on your own server. awesomeness: 10 tags: feature +references: +- bin/silverbullet/src/server.rs +- server-common/src/space/disk.rs --- According to [Wikipedia](https://en.wikipedia.org/wiki/Self-hosting_(web_services)): diff --git a/docs/Service.md b/docs/Service.md index cc0b5ce9..3dbd585a 100644 --- a/docs/Service.md +++ b/docs/Service.md @@ -1,3 +1,8 @@ +--- +references: +- client/service_registry.ts +- client/plugos/syscalls/service_registry.ts +--- The SilverBullet service bus is an extension mechanism for defining and discovering pluggable behavior. It lets you register named services that can be discovered and invoked by other parts of SilverBullet or your own scripts. This enables a plugin-like architecture where multiple implementations can compete for the same operation, with the best match winning. # Concepts diff --git a/docs/Share.md b/docs/Share.md index bbfcc0b9..507c31b1 100644 --- a/docs/Share.md +++ b/docs/Share.md @@ -1,6 +1,9 @@ --- description: The mechanism for publishing or sharing individual pages. tags: maturity/beta glossary +references: +- libraries/Library/Std/Infrastructure/Share.md +- plugs/configuration-manager/libraries.ts --- SilverBullet is aimed for single-user, private use. Nevertheless, many have the need to _share_ some content kept in SilverBullet with the outside world: to push content out, pull it in, or even sync between different locations. This is where SilverBullet _share_ functionality comes in. diff --git a/docs/Slash Command.md b/docs/Slash Command.md index 377c5b0f..de114172 100644 --- a/docs/Slash Command.md +++ b/docs/Slash Command.md @@ -1,6 +1,9 @@ --- description: "A /-triggered shortcut in the editor for inserting content or running actions." tags: glossary +references: +- client/plugos/hooks/slash_command.ts +- libraries/Library/Std/APIs/Command.md --- Slash commands are quick ways to perform repetitive tasks. You trigger them by typing `/` in your text (after whitespace) followed by the command name — autocompletion will help you find the right one. diff --git a/docs/Slash Templates.md b/docs/Slash Templates.md index 7ad3b211..4d9b66a4 100644 --- a/docs/Slash Templates.md +++ b/docs/Slash Templates.md @@ -1,6 +1,9 @@ --- description: Templates invoked via slash commands to insert pre-defined content. tags: glossary +references: +- libraries/Library/Std/Infrastructure/Slash Templates.md +- libraries/Library/Std/Slash Templates/tpl.md --- Slash templates are a quick way to define [[Slash Command|slash commands]] that insert templated content at the cursor position. They are defined as pages tagged with `#meta/template/slash`. diff --git a/docs/Space Lua.md b/docs/Space Lua.md index fa85a839..036a6f47 100644 --- a/docs/Space Lua.md +++ b/docs/Space Lua.md @@ -1,6 +1,9 @@ --- description: "SilverBullet's embedded Lua scripting environment for extending functionality." tags: glossary +references: +- client/space_lua.ts +- client/space_lua/* --- Space Lua is a custom dialect and implementation of the [Lua programming language](https://lua.org/), embedded in SilverBullet. It aims to be a largely complete Lua implementation, but adds a few non-standard features while remaining syntactically compatible with “real” Lua. diff --git a/docs/Space Lua/Conventions.md b/docs/Space Lua/Conventions.md index 448006f1..760dbdf3 100644 --- a/docs/Space Lua/Conventions.md +++ b/docs/Space Lua/Conventions.md @@ -1,4 +1,9 @@ -#maturity/beta +--- +tags: maturity/beta +references: +- client/space_lua/parse.ts +- client/space_lua/runtime.ts +--- Some coding conventions for [[Space Lua]]. Work in progress. diff --git a/docs/Space Lua/DOM.md b/docs/Space Lua/DOM.md index 6116693e..c81a18ae 100644 --- a/docs/Space Lua/DOM.md +++ b/docs/Space Lua/DOM.md @@ -1,3 +1,8 @@ +--- +references: +- libraries/Library/Std/APIs/DOM.md +- client/space_lua/render_widget.ts +--- The DOM builder API provides a clean, declarative way to construct HTML elements from [[Space Lua]]. It is typically used to build [[API/widget|Widgets]] for rendering dynamic UI in your pages. The full API reference is at [[API/dom]]. diff --git a/docs/Space Lua/Integrated Query.md b/docs/Space Lua/Integrated Query.md index 1119b14f..319a5193 100644 --- a/docs/Space Lua/Integrated Query.md +++ b/docs/Space Lua/Integrated Query.md @@ -1,6 +1,10 @@ --- description: A Lua-embedded query syntax for selecting and transforming objects. tags: glossary +references: +- client/space_lua/query_collection.ts +- client/space_lua/query_env.ts +- client/space_lua/parse.ts --- Space Lua Integrated Query (SLIQ) is a SilverBullet specific Lua extension. It adds a convenient query syntax to the language in a backwards compatible way. It does so by overloading Lua’s default function call + single argument syntax when using `query` as the function call. As a result, Lua programs using SLIQ are still syntactically valid Lua. diff --git a/docs/Space Lua/Integrated Query/Aggregating.md b/docs/Space Lua/Integrated Query/Aggregating.md index f13f7758..fb13b81f 100644 --- a/docs/Space Lua/Integrated Query/Aggregating.md +++ b/docs/Space Lua/Integrated Query/Aggregating.md @@ -1,4 +1,9 @@ -#maturity/experimental +--- +tags: maturity/experimental +references: +- client/space_lua/aggregates.ts +- client/space_lua/query_collection.ts +--- The `group by` and `having` clauses of [[Space Lua/Integrated Query]] support aggregate functions for grouped analysis, following SQL-style semantics. diff --git a/docs/Space Lua/Integrated Query/Grouping.md b/docs/Space Lua/Integrated Query/Grouping.md index 72744202..2ceb4042 100644 --- a/docs/Space Lua/Integrated Query/Grouping.md +++ b/docs/Space Lua/Integrated Query/Grouping.md @@ -1,4 +1,9 @@ -#maturity/experimental +--- +tags: maturity/experimental +references: +- client/space_lua/query_collection.ts +- client/space_lua/parse.ts +--- The `group by` and `having` clauses extend [[Space Lua/Integrated Query]] with SQL-style grouping and aggregate filtering. diff --git a/docs/Space Lua/JavaScript Interop.md b/docs/Space Lua/JavaScript Interop.md index f9e9b480..5acb1a5b 100644 --- a/docs/Space Lua/JavaScript Interop.md +++ b/docs/Space Lua/JavaScript Interop.md @@ -1,3 +1,8 @@ +--- +references: +- client/space_lua/stdlib/js.ts +- client/space_lua/runtime.ts +--- Space Lua runs in the browser and has direct access to JavaScript APIs through the `js` module. This enables you to use the browser's native capabilities and import external JavaScript libraries. Use this functionality with caution. With great power comes comes great responsibility. The full API reference is at [[API/js]]. diff --git a/docs/Space Lua/Lua Integrated Query/Aggregating.md b/docs/Space Lua/Lua Integrated Query/Aggregating.md index 638d6a5a..44c44ab1 100644 --- a/docs/Space Lua/Lua Integrated Query/Aggregating.md +++ b/docs/Space Lua/Lua Integrated Query/Aggregating.md @@ -1 +1,6 @@ +--- +references: +- client/space_lua/aggregates.ts +- client/space_lua/query_collection.ts +--- This page has moved to [[Space Lua/Integrated Query/Aggregating]]. diff --git a/docs/Space Lua/Lua Integrated Query/Grouping.md b/docs/Space Lua/Lua Integrated Query/Grouping.md index d09dd16d..ea6c3723 100644 --- a/docs/Space Lua/Lua Integrated Query/Grouping.md +++ b/docs/Space Lua/Lua Integrated Query/Grouping.md @@ -1 +1,6 @@ +--- +references: +- client/space_lua/query_collection.ts +- client/space_lua/parse.ts +--- This page has moved to [[Space Lua/Integrated Query/Grouping]]. diff --git a/docs/Space Lua/Quirks.md b/docs/Space Lua/Quirks.md index 865091c7..a9f69788 100644 --- a/docs/Space Lua/Quirks.md +++ b/docs/Space Lua/Quirks.md @@ -1,3 +1,8 @@ +--- +references: +- client/space_lua/parse.ts +- client/space_lua/runtime.ts +--- A few notable [[Space Lua]] quirks. # Lua implementation notes diff --git a/docs/Space Lua/Standard Library.md b/docs/Space Lua/Standard Library.md index fdebb138..cedf5f13 100644 --- a/docs/Space Lua/Standard Library.md +++ b/docs/Space Lua/Standard Library.md @@ -1,3 +1,8 @@ +--- +references: +- client/space_lua/stdlib.ts +- client/space_lua/stdlib/load.ts +--- Space Lua includes a comprehensive standard library based on Lua 5.4, with additional non-standard extensions useful for text processing and note-taking workflows. This page gives an overview. Each module has its own detailed API reference page. diff --git a/docs/Space Lua/Thread Locals.md b/docs/Space Lua/Thread Locals.md index b21323e4..defef244 100644 --- a/docs/Space Lua/Thread Locals.md +++ b/docs/Space Lua/Thread Locals.md @@ -1,4 +1,9 @@ -#maturity/experimental +--- +tags: maturity/experimental +references: +- client/space_lua/runtime.ts +- client/space_lua/eval.ts +--- There is “magic” `_CTX` global variable available from which you can access some context-specific values. Currently the following keys are available: diff --git a/docs/Space Lua/Widget.md b/docs/Space Lua/Widget.md index 4c12333c..551968f8 100644 --- a/docs/Space Lua/Widget.md +++ b/docs/Space Lua/Widget.md @@ -1,6 +1,9 @@ --- description: A rendered UI component (markdown or HTML). tags: glossary +references: +- client/space_lua/render_widget.ts +- client/codemirror/lua_widget.ts --- The `${lua expression}` syntax can be used to implement custom widgets. If the Lua expression evaluates to a simple string, it will live preview as that string rendered as markdown. However, if the expression returns a `widget.new`-generated result value, you can do some fancier stuff. diff --git a/docs/Space Style.md b/docs/Space Style.md index 0e9d0078..d14e2bf4 100644 --- a/docs/Space Style.md +++ b/docs/Space Style.md @@ -1,6 +1,9 @@ --- description: Custom CSS applied across your space via a special page. tags: customization glossary +references: +- plugs/index/space_style.ts +- client/style.ts --- Space Style is [[Space Lua]]’s stylish sibling. It enables you to add your own styling to SilverBullet with `space-style` [[Markdown/Fenced Code Block]]. diff --git a/docs/Space.md b/docs/Space.md index 59a9a99c..fbff383a 100644 --- a/docs/Space.md +++ b/docs/Space.md @@ -1,6 +1,9 @@ --- description: The top-level folder of Markdown files, assets, and configuration that SilverBullet serves. tags: glossary +references: +- client/spaces/space_primitives.ts +- server-common/src/space.rs --- A _space_ is SilverBullet terminology for a workspace, or project, or instance. [Obsidian](https://obsidian.md/) calls this a vault, [LogSeq](https://logseq.com/) calls it a graph. You may think of it as a [[Folder]] or a directory — because in practical terms, that’s all it is. diff --git a/docs/Special Pages.md b/docs/Special Pages.md index 4e5ed087..9e59282d 100644 --- a/docs/Special Pages.md +++ b/docs/Special Pages.md @@ -1,7 +1,5 @@ SilverBullet has a few “special pages.” The convention is to always use ALL CAPS for these page names. Generally the format of these pages is that they can contain arbitrary text, but embedded in them is some sort of fenced code block (triple backtick blocks) that encode something special. What _exactly_ depends on the page. -All special pages except [[CONFIG]] are optional: if they don’t exist, well, they don’t do anything. - Here are the current list of “special pages” known to humankind: * [[CONFIG]] for setting various settings diff --git a/docs/Sync.md b/docs/Sync.md index 64b6e698..522364e5 100644 --- a/docs/Sync.md +++ b/docs/Sync.md @@ -1,6 +1,10 @@ --- description: The bidirectional synchronisation between the client's local store and the server. tags: glossary +references: +- client/spaces/sync.ts +- client/service_worker/sync_engine.ts +- plugs/sync/sync.ts --- SilverBullet is an offline-first web application. Therefore it keeps a copy of your space locally in your browser. It implements a sync engine to continuously keep this local copy in sync with the server (for technical details, see [[Architecture]]). diff --git a/docs/Tag.md b/docs/Tag.md index e22f8296..b18ecac4 100644 --- a/docs/Tag.md +++ b/docs/Tag.md @@ -1,6 +1,9 @@ --- description: A label applied to objects for grouping and querying. tags: glossary +references: +- plugs/index/tags.ts +- libraries/Library/Std/APIs/Tag.md --- Tags in SilverBullet are used to encode types of [[Object|Objects]], they’re similar to tables in relational databases, or classes in object-oriented programming. diff --git a/docs/Task.md b/docs/Task.md index eb2a733c..85c87436 100644 --- a/docs/Task.md +++ b/docs/Task.md @@ -1,6 +1,9 @@ --- description: A checkbox item tracked as a queryable object. tags: glossary +references: +- plugs/index/task.ts +- client/codemirror/task.ts --- The task notation syntax is a [[Markdown]] extension to write down tasks. diff --git a/docs/Template.md b/docs/Template.md index 3db3d712..807a6fc8 100644 --- a/docs/Template.md +++ b/docs/Template.md @@ -1,6 +1,9 @@ --- description: Reusable content with placeholder expressions, used for page creation, slash commands, and more. tags: glossary +references: +- libraries/Library/Std/APIs/Template.md +- client/space_lua/stdlib.ts --- A template in SilverBullet is a string that contains `${expression}` placeholders, which get evaluated using [[Space Lua]]. Templates are a mechanism for dynamically rendering content in your pages. diff --git a/docs/Top Bar.md b/docs/Top Bar.md index eb2730d8..9eedb2d7 100644 --- a/docs/Top Bar.md +++ b/docs/Top Bar.md @@ -1,3 +1,8 @@ +--- +references: +- client/components/top_bar.tsx +- client/editor_ui.tsx +--- The top bar contains: * [[Page Namer]] diff --git a/docs/Transclusions.md b/docs/Transclusions.md index 1b215ab0..013490ab 100644 --- a/docs/Transclusions.md +++ b/docs/Transclusions.md @@ -1,6 +1,9 @@ --- description: Inline embedding of one page's content inside another. tags: glossary +references: +- plug-api/lib/transclusion.ts +- client/markdown_renderer/markdown_render.ts --- Transclusions are an extension of the [[Markdown]] syntax enabling inline embedding of content. diff --git a/docs/URI.md b/docs/URI.md index 5350d46c..2c22f65b 100644 --- a/docs/URI.md +++ b/docs/URI.md @@ -1,3 +1,8 @@ +--- +references: +- libraries/Library/Std/Infrastructure/URI.md +- plug-api/lib/resolve.ts +--- URIs in SilverBullet are a means to point to locations outside of your [[Space|Space]], APIs to read and write to URIs are available via [[API/net]]. Use cases: diff --git a/docs/Vim.md b/docs/Vim.md index dbf2b195..9ac86c94 100644 --- a/docs/Vim.md +++ b/docs/Vim.md @@ -1,4 +1,9 @@ -#customization +--- +tags: customization +references: +- plugs/editor/vim.ts +- client/vim_loader.ts +--- SilverBullet has a basic Vim mode. You can toggle it using the ${widgets.commandButton("Editor: Toggle Vim Mode")} command. diff --git a/docs/Virtual Pages.md b/docs/Virtual Pages.md index 4ea4d283..ed800b74 100644 --- a/docs/Virtual Pages.md +++ b/docs/Virtual Pages.md @@ -1,6 +1,9 @@ --- description: A page generated dynamically by code rather than stored as a file. tags: glossary +references: +- libraries/Library/Std/APIs/Virtual Page.md +- plugs/editor/page.ts --- Virtual pages are read-only pages that don't exist as files in your space. Instead, they are generated dynamically when you navigate to them. This is useful for building pages whose content is computed on-the-fly — for example, pages that show all objects with a particular tag. diff --git a/docs/X-Ray.md b/docs/X-Ray.md index 07fe2edf..8b8e1c81 100644 --- a/docs/X-Ray.md +++ b/docs/X-Ray.md @@ -1,3 +1,8 @@ +--- +references: +- plugs/index/xray.ts +- client/styles/xray.scss +--- X-Ray is an editor lens that shows you the structure SilverBullet’s indexer sees in your document. When switched on, every text range the indexer extracts as an [[Object]] is underlined. When you hover your mouse over it, it will show you all the attributes extracted as [[YAML]]. You may also be interested in the [[Object Graph]]. diff --git a/docs/YAML.md b/docs/YAML.md index 27b8fd7e..f6c46d52 100644 --- a/docs/YAML.md +++ b/docs/YAML.md @@ -1,3 +1,8 @@ +--- +references: +- plug-api/lib/yaml.ts +- plugs/index/yaml.ts +--- YAML stands for “YAML Ain’t Markup Language.” More information can be found at [the YAML website](https://yaml.org/). SilverBullet uses YAML in various contexts, specifically [[Frontmatter]].