From 5c3612eeeb4ebd24daa0352ed956d61241ea0b82 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 3 Oct 2023 17:59:33 +0200 Subject: [PATCH] Refactored the website --- website/Objects.md | 4 ++-- website/SilverBullet.md | 14 ++++++++++++-- website/πŸ”Œ Directive.md | 5 +---- website/πŸ”Œ Editor.md | 5 +---- website/πŸ”Œ Emoji.md | 5 +---- website/πŸ”Œ Github.md | 4 +--- website/πŸ”Œ Graph View.md | 3 +-- website/πŸ”Œ Index.md | 6 ++---- website/πŸ”Œ KaTeX.md | 3 ++- website/πŸ”Œ Markdown.md | 6 +----- website/πŸ”Œ Mattermost.md | 4 +--- website/πŸ”Œ Mermaid.md | 3 ++- website/πŸ”Œ Plugs.md | 4 ++-- website/πŸ”Œ Serendipity.md | 3 +-- website/πŸ”Œ Share.md | 5 +++-- website/πŸ”Œ Tasks.md | 5 +---- website/πŸ”Œ Template.md | 5 +---- website/πŸ”Œ Twitter.md | 3 ++- 18 files changed, 37 insertions(+), 50 deletions(-) diff --git a/website/Objects.md b/website/Objects.md index e46b67bb..fbd1d547 100644 --- a/website/Objects.md +++ b/website/Objects.md @@ -1,4 +1,4 @@ -#meta-tag +#core SilverBullet automatically builds and maintains an index of _objects_ extracted from all markdown pages in your space. It subsequently allows you to [[Live Queries]] this database in (potentially) useful ways. @@ -26,7 +26,7 @@ Every object has one or more tags, defining the types of an object. Some tags ar Here are the currently built-in tags: ## page -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 [[Tags]] in the _first paragraph of your page_, as is done in this particular page with a #meta-tag. +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 [[Tags]] in the _first paragraph of your page_, as is done with the #core tag at the beginning of this page. 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/website/SilverBullet.md b/website/SilverBullet.md index 09dd412e..dfa4ec0b 100644 --- a/website/SilverBullet.md +++ b/website/SilverBullet.md @@ -70,12 +70,22 @@ name: SilverBullet rating: 5 ``` -But where things get really interesting when using features like [[Live Queries]]. For instance, here are: +But where things get _really_ interesting is when using features like [[Live Queries]] that allow you to query all types of [[Objects]] indexed based on the pages in your space. + +Let’s explore this with a meta example of using this for this very website. All pages in this space that represent a plug are tagged with the #plug tag. Now, if we would want to render a list of all plugs in one place using the [[template/plug]] template, we can simply do this: ```query -page order by name desc limit 5 +plug render [[template/plug]] ``` +Hover over that list, click the edit button to see the query that generates this view. +And it’s not just pages that can be queried, there’s a large variety of queriable sources and you can define your own via tags. Examples include `task`s, `page`s, `tag`s, and `link`s. + +For instance, here’s a list of all outgoing page links from this page: +```query +link where page = "{{@page.name}}" select toPage as name render [[template/page]] +``` +The sky is the limit. ## Install SilverBullet Has your mind been sufficiently blown to commit to an install? Took you long enough, alright then. Please proceed to the [[Install]] and enjoy! diff --git a/website/πŸ”Œ Directive.md b/website/πŸ”Œ Directive.md index 56c3f2e6..5484ff8c 100644 --- a/website/πŸ”Œ Directive.md +++ b/website/πŸ”Œ Directive.md @@ -1,7 +1,4 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet ---- +#plug > **Warning** Deprecated > Directives are now deprecated and will likely soon be removed, use [[Live Templates]] and [[Live Queries]] instead. diff --git a/website/πŸ”Œ Editor.md b/website/πŸ”Œ Editor.md index 2081652e..acd910dc 100644 --- a/website/πŸ”Œ Editor.md +++ b/website/πŸ”Œ Editor.md @@ -1,7 +1,4 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet ---- +#plug The `editor` plug implements foundational editor functionality for SilverBullet. diff --git a/website/πŸ”Œ Emoji.md b/website/πŸ”Œ Emoji.md index fc5d6d2f..5620604c 100644 --- a/website/πŸ”Œ Emoji.md +++ b/website/πŸ”Œ Emoji.md @@ -1,6 +1,3 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet ---- +#plug The Emoji plug provides support for auto-completion of the `:emoji:` style syntax. \ No newline at end of file diff --git a/website/πŸ”Œ Github.md b/website/πŸ”Œ Github.md index 4ae7ada9..5d94097c 100644 --- a/website/πŸ”Œ Github.md +++ b/website/πŸ”Œ Github.md @@ -1,11 +1,9 @@ --- -type: plug uri: github:silverbulletmd/silverbullet-github/github.plug.js repo: https://github.com/silverbulletmd/silverbullet-github author: Zef Hemel -share-support: true --- - +#plug #share-support ```template page: "[[!raw.githubusercontent.com/silverbulletmd/silverbullet-github/main/README]]" raw: true diff --git a/website/πŸ”Œ Graph View.md b/website/πŸ”Œ Graph View.md index 88540307..eb396cff 100644 --- a/website/πŸ”Œ Graph View.md +++ b/website/πŸ”Œ Graph View.md @@ -1,10 +1,9 @@ --- -type: plug 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 diff --git a/website/πŸ”Œ Index.md b/website/πŸ”Œ Index.md index 25328b11..b6e5c801 100644 --- a/website/πŸ”Œ Index.md +++ b/website/πŸ”Œ Index.md @@ -1,7 +1,5 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet ---- +#plug + SilverBullet has a generic indexing infrastructure. Pages are reindexed upon saving, so about every second. The [[πŸ”Œ Index]] plug also defines syntax for [[Tags]] diff --git a/website/πŸ”Œ KaTeX.md b/website/πŸ”Œ KaTeX.md index d23bab1f..b06ea307 100644 --- a/website/πŸ”Œ KaTeX.md +++ b/website/πŸ”Œ KaTeX.md @@ -1,5 +1,6 @@ --- -type: plug +tags: +- plug uri: github:silverbulletmd/silverbullet-katex/katex.plug.js repo: https://github.com/silverbulletmd/silverbullet-katex author: Zef Hemel diff --git a/website/πŸ”Œ Markdown.md b/website/πŸ”Œ Markdown.md index 0d780003..781a21dc 100644 --- a/website/πŸ”Œ Markdown.md +++ b/website/πŸ”Œ Markdown.md @@ -1,8 +1,4 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet -share-support: true ---- +#share-support #plug The Markdown plug provides support for various advanced Markdown features, specifically: diff --git a/website/πŸ”Œ Mattermost.md b/website/πŸ”Œ Mattermost.md index 65772347..645d3540 100644 --- a/website/πŸ”Œ Mattermost.md +++ b/website/πŸ”Œ Mattermost.md @@ -1,11 +1,9 @@ --- -type: plug uri: github:silverbulletmd/silverbullet-mattermost/mattermost.plug.json repo: https://github.com/silverbulletmd/silverbullet-mattermost author: Zef Hemel -share-support: true --- - +#plug #share-support ```template page: "[[!raw.githubusercontent.com/silverbulletmd/silverbullet-mattermost/main/README]]" raw: true diff --git a/website/πŸ”Œ Mermaid.md b/website/πŸ”Œ Mermaid.md index cae01f26..a43a026d 100644 --- a/website/πŸ”Œ Mermaid.md +++ b/website/πŸ”Œ Mermaid.md @@ -1,5 +1,6 @@ --- -type: plug +tags: +- plug uri: github:silverbulletmd/silverbullet-mermaid/mermaid.plug.js repo: https://github.com/silverbulletmd/silverbullet-mermaid author: Zef Hemel diff --git a/website/πŸ”Œ Plugs.md b/website/πŸ”Œ Plugs.md index 85917745..eba7f4eb 100644 --- a/website/πŸ”Œ Plugs.md +++ b/website/πŸ”Œ Plugs.md @@ -17,12 +17,12 @@ Plugs are distributed as self-contained JavaScript bundles (ending with `.plug.j ## Core plugs These plugs are distributed with SilverBullet and are automatically enabled: ```query -page where type = "plug" and uri = null order by name render [[template/plug]] +plug where uri = null order by name render [[template/plug]] ``` ## Third-party plugs These plugs are written either by third parties or distributed separately from the main SB distribution: ```query -page where type = "plug" and uri != null order by name render [[template/plug]] +plug where uri != null order by name render [[template/plug]] ``` ## How to develop your own plug diff --git a/website/πŸ”Œ Serendipity.md b/website/πŸ”Œ Serendipity.md index aded5b97..8fe612be 100644 --- a/website/πŸ”Œ Serendipity.md +++ b/website/πŸ”Œ Serendipity.md @@ -1,10 +1,9 @@ --- -type: plug uri: github:m1lt0n/silverbullet-serendipity/serendipity.plug.json repo: https://github.com/m1lt0n/silverbullet-serendipity author: Pantelis Vratsalis --- - +#plug ```template page: "[[!raw.githubusercontent.com/m1lt0n/silverbullet-serendipity/main/README]]" raw: true diff --git a/website/πŸ”Œ Share.md b/website/πŸ”Œ Share.md index 5f5cd848..b1148e33 100644 --- a/website/πŸ”Œ Share.md +++ b/website/πŸ”Œ Share.md @@ -1,5 +1,6 @@ --- -type: plug +tags: +- repo: https://github.com/silverbulletmd/silverbullet --- @@ -9,5 +10,5 @@ See the [original RFC](https://github.com/silverbulletmd/silverbullet/discussion Specific implementations for sharing are implemented in other plugs, specifically: ```query -page where share-support = true render [[template/page]] +share-support render [[template/page]] ``` diff --git a/website/πŸ”Œ Tasks.md b/website/πŸ”Œ Tasks.md index d6e5c7c2..3792741a 100644 --- a/website/πŸ”Œ Tasks.md +++ b/website/πŸ”Œ Tasks.md @@ -1,7 +1,4 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet ---- +#plug The Tasks plug implements task support in SilverBullet. diff --git a/website/πŸ”Œ Template.md b/website/πŸ”Œ Template.md index cc424409..fed0e5ec 100644 --- a/website/πŸ”Œ Template.md +++ b/website/πŸ”Œ Template.md @@ -1,7 +1,4 @@ ---- -type: plug -repo: https://github.com/silverbulletmd/silverbullet ---- +#plug The [[πŸ”Œ Template]] plug implements a few templating mechanisms. diff --git a/website/πŸ”Œ Twitter.md b/website/πŸ”Œ Twitter.md index b908c3ca..f5eb55b4 100644 --- a/website/πŸ”Œ Twitter.md +++ b/website/πŸ”Œ Twitter.md @@ -1,5 +1,6 @@ --- -type: plug +tags: +- plug uri: github:silverbulletmd/silverbullet-twitter/twitter.plug.js repo: https://github.com/silverbulletmd/silverbullet-twitter author: SilverBullet Authors