1
0

Website cleanup

This commit is contained in:
Zef Hemel 2023-11-25 14:49:02 +01:00
parent bf5d17aa7a
commit a03b211dad
9 changed files with 23 additions and 36 deletions

View File

@ -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.

View File

@ -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 havent 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:

View File

@ -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 dont know where youre going, you may not get there.”
> — Yogi Berra
## Code
# Code
For the programmers among us, theres 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

View File

@ -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 SilverBullets [[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!

View File

@ -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 Obsidians 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).

View File

@ -1,3 +1,3 @@
#plug
The Emoji plug provides support for auto-completion of the `:emoji:` style syntax.
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).

View File

@ -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
```

View File

@ -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

View File

@ -1 +0,0 @@
This is very much in progress, have a look at our [Github Issues](https://github.com/silverbulletmd/silverbullet/issues) page if youd like to help out!