From a03b211dad79a877e9bfc8f4249124e32051462d Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 25 Nov 2023 14:49:02 +0100 Subject: [PATCH] Website cleanup --- website/Install/Local.md | 4 ++-- website/Live Queries.md | 13 ++++++------- website/Markdown/Basics.md | 15 ++++++++------- website/SilverBullet.md | 2 ++ website/๐Ÿ’ก Inspiration.md | 5 ----- website/๐Ÿ”Œ Emoji.md | 2 +- website/๐Ÿ”Œ Graph View.md | 10 ---------- website/๐Ÿ”Œ Index.md | 7 ++++--- website/๐Ÿ—บ Roadmap.md | 1 - 9 files changed, 23 insertions(+), 36 deletions(-) delete mode 100644 website/๐Ÿ’ก Inspiration.md delete mode 100644 website/๐Ÿ”Œ Graph View.md delete mode 100644 website/๐Ÿ—บ Roadmap.md diff --git a/website/Install/Local.md b/website/Install/Local.md index 620aa485..f5636677 100644 --- a/website/Install/Local.md +++ b/website/Install/Local.md @@ -130,7 +130,7 @@ To build your own version of the docker image, run `./scripts/build_docker.sh`. # Configuration SilverBullet is partially configured via flags (run it with `--help`) or alternatively via environment variables and partially via a [[SETTINGS]] page in your space. -# Environment variables +## Environment variables $env You can configure SB with environment variables instead of flags, which is probably what you want to do in a docker setup. The following environment variables are supported: @@ -139,4 +139,4 @@ You can configure SB with environment variables instead of flags, which is proba * `SB_PORT`: Sets the port to listen to, e.g. `SB_PORT=1234` * `SB_FOLDER`: Sets the folder to expose, e.g. `SB_FOLDER=/space` * `SB_AUTH`: Loads an [[Authentication]] database from a (JSON encoded) string, e.g. `SB_AUTH=$(cat /path/to/.auth.json)` -* `SB_SYNC_ONLY`: Runs the server in a "dumb" space store only mode (not indexing content or keeping other state), e.g. `SB_SYNC_ONLY=1` +* `SB_SYNC_ONLY`: Runs the server in a "dumb" space store only mode (not indexing content or keeping other state), e.g. `SB_SYNC_ONLY=1`. This will disable the Online [[Client Modes]] altogether (and not even show the sync icon in the top bar). Conceptually, [silverbullet.md](https://silverbullet.md) runs in this mode. diff --git a/website/Live Queries.md b/website/Live Queries.md index 4f60fd2f..c9d8ac95 100644 --- a/website/Live Queries.md +++ b/website/Live Queries.md @@ -1,6 +1,6 @@ Live Queries enable a (quasi) live view on various data sources, usually [[Objects]], and renders their results inline via [[Live Preview]] either as a template, or using [[Templates]]. -## Syntax +# Syntax The syntax of live queries are inspired by [SQL](https://en.wikipedia.org/wiki/SQL). Below is a query that demonstrates some of the supported clauses, hover over the result and click the edit icon to shows the code that generates the view: ```query page @@ -16,7 +16,7 @@ For those comfortable reading such things [here you can find the full query gram The general syntax is to specify a `querySource` followed by a number of clauses that modify or restrict. If you havenโ€™t already, check out how [[Objects]] work in SilverBullet. -## Clauses +# Clauses ## `where` [[@expression]] A `where` clause filters out all objects that do not match a certain condition. You can have multiple `where` clauses if you like, which will have the same effect as combining them with the `and` keyword. @@ -47,7 +47,7 @@ To limit the number of results, you can use a `limit` clause: ```query person where page = "{{@page.name}}" limit 1 ``` -### `select` +## `select` To select only specific attributes from the result set, you can use the `select` clause. You can use it either simply as `select attribute1, attribute2` but also select the value of certain expressions and give them a name via the `select age + 1 as nextYear` syntax: ```query @@ -55,7 +55,8 @@ person where page = "{{@page.name}}" select name, age, age + 1 as nextYear ``` -### `render each [[template]]` and `render all [[template]]` + +## `render each [[template]]` and `render all [[template]]` $render By default results are rendered as a table, to instead render results using [[Templates|a template]], use the `render` clause, which comes in two shapes `render each` where the template is instantiated for _each_ result (the `each` keyword is optional): @@ -72,9 +73,7 @@ person where page = "{{@page.name}}" render all [[template/people]] ``` - - -## Expressions +# Expressions $expression Primitives: diff --git a/website/Markdown/Basics.md b/website/Markdown/Basics.md index 91deb114..cd0e0489 100644 --- a/website/Markdown/Basics.md +++ b/website/Markdown/Basics.md @@ -1,12 +1,13 @@ 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 -So to write markdown, you just write text. But then to emphasize something you can add `_underscores_` around a phrase to make look _italic_, or `**asterisks**` to make it **bold**. You can also use `~~tildes~~` for ~~strikethrough~~ and `==double equals==` for ==highlighting==. +# Basic markup -### Links +To write markdown, you just write text. But then to emphasize something you can add `_underscores_` around a phrase to make look _italic_, or `**asterisks**` to make it **bold**. You can also use `~~tildes~~` for ~~strikethrough~~ and `==double equals==` for ==highlighting==. + +# Links To add external links you use the `[site link](https://silverbullet.md)` syntax, which will appear as [site link](https://silverbullet.md). If you want to link to other pages in your space you use the `[[wiki link syntax]]`, e.g. [[SilverBullet]]. To change the link text you can use the `[[SilverBullet|best PKM evah]]` syntax: [[SilverBullet|best PKM evah]]. -## Lists and tasks +# Lists and tasks You can create three types of lists: Unordered lists are created by prefixing a line with `*` or `-`. For instance: @@ -32,16 +33,16 @@ When you click the checkbox, it will toggle its state and replace the ` ` inside * [DONE] This task is done * [TO DO] This task is still to be done -## Headers +# Headers Markdown supports various levels of headings, which generally are created by prefixing a line with one or more `#`. The more `#`โ€˜s the deeper the header nesting. -## Quotes +# Quotes You can use block quotes by prefixing lines with `>`: > โ€œIf you donโ€™t know where youโ€™re going, you may not get there.โ€ > โ€”ย Yogi Berra -## Code +# Code For the programmers among us, thereโ€™s three ways to mark up code. If you want to write some code inline, you can use backticks: `this is code`. For long code snippets you can either use a four-space indent: This is code diff --git a/website/SilverBullet.md b/website/SilverBullet.md index 3e92ae5b..111e818a 100644 --- a/website/SilverBullet.md +++ b/website/SilverBullet.md @@ -105,6 +105,8 @@ link where page = "{{@page.name}}" select toPage as name render [[template/page] ``` The sky is the limit. See [[Objects]] and [[Live Queries]] for more information. +For additional productivity boosts, have a look at SilverBulletโ€™s [[Templates]] functionality. + # Install SilverBullet Has your mind been sufficiently blown to commit to an install? Took you long enough, alright then. Please proceed to [[Install]] and enjoy! diff --git a/website/๐Ÿ’ก Inspiration.md b/website/๐Ÿ’ก Inspiration.md deleted file mode 100644 index c4fadaa6..00000000 --- a/website/๐Ÿ’ก Inspiration.md +++ /dev/null @@ -1,5 +0,0 @@ -Inspiration for SilverBullet comes primarily from -[Obsidian](https://obsidian.md/) and its vast plug-in ecosystem (the -work-in-progress plugs around querying and tasks are inspired by Obsidianโ€™s tasks and dataview plugins), but also [Roam Research](https://roamresearch.com/) was an inspiration. - -The way plugs are implemented is a further iteration on how this was done in a previous project of mine (now defunct) called [Zed](https://github.com/zedapp/zed) as well as [Matterless](https://github.com/zefhemel/matterless). diff --git a/website/๐Ÿ”Œ Emoji.md b/website/๐Ÿ”Œ Emoji.md index 5620604c..bdfd6e93 100644 --- a/website/๐Ÿ”Œ Emoji.md +++ b/website/๐Ÿ”Œ Emoji.md @@ -1,3 +1,3 @@ #plug -The Emoji plug provides support for auto-completion of the `:emoji:` style syntax. \ No newline at end of file +The Emoji plug provides support for auto-completion of the `:emoji:` style syntax. It currently has support for the [15.1 emoji unicode standard](https://emojipedia.org/emoji-15.1). \ No newline at end of file diff --git a/website/๐Ÿ”Œ Graph View.md b/website/๐Ÿ”Œ Graph View.md deleted file mode 100644 index eb396cff..00000000 --- a/website/๐Ÿ”Œ Graph View.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -uri: github:silverbulletmd/silverbullet-graphview/graphview.plug.json -repo: https://github.com/silverbulletmd/silverbullet-graphview -author: Bertjan Broeksema ---- -#plug -```template -page: "[[!raw.githubusercontent.com/silverbulletmd/silverbullet-graphview/main/README]]" -raw: true -``` \ No newline at end of file diff --git a/website/๐Ÿ”Œ Index.md b/website/๐Ÿ”Œ Index.md index b6e5c801..2010c24d 100644 --- a/website/๐Ÿ”Œ Index.md +++ b/website/๐Ÿ”Œ Index.md @@ -1,8 +1,8 @@ #plug -SilverBullet has a generic indexing infrastructure. Pages are reindexed upon saving, so about every second. +SilverBullet has a generic indexing infrastructure for [[Objects]]. Pages are automatically index upon save, so about every second. -The [[๐Ÿ”Œ Index]] plug also defines syntax for [[Tags]] +The [[๐Ÿ”Œ Index]] plug also defines syntax for [[Tags]]. ## Content indexing The [[๐Ÿ”Œ Index]] plug indexes the following: @@ -11,9 +11,10 @@ The [[๐Ÿ”Œ Index]] plug indexes the following: * [[Tags]] * Page backlinks (queryable via the `link` query source), this information is used when renaming a page (automatically updating pages that link to it). * List items, such as bulleted and numbered lists (queryable via the `item` query source) +* Paragraphs ## Commands -* {[Space: Reindex]}: reindex the entire +* {[Space: Reindex]}: Reindexes the entire space * {[Page: Rename]}: Rename a page #ProTip Renaming is more conveniently done by editing the page name in the header and hitting `Enter`. * {[Page: Batch Rename Prefix]}: Rename a page prefix across the entire space diff --git a/website/๐Ÿ—บ Roadmap.md b/website/๐Ÿ—บ Roadmap.md deleted file mode 100644 index c053d609..00000000 --- a/website/๐Ÿ—บ Roadmap.md +++ /dev/null @@ -1 +0,0 @@ -This is very much in progress, have a look at our [Github Issues](https://github.com/silverbulletmd/silverbullet/issues) page if youโ€™d like to help out!