Rebuilt frontmatter templates as template widgets

This commit is contained in:
Zef Hemel
2024-01-08 17:08:35 +01:00
parent 5b3dd500e4
commit 848e11a773
45 changed files with 471 additions and 483 deletions
+8 -22
View File
@@ -1,28 +1,21 @@
Code widgets are a SilverBullet-specific extension to [[Markdown]]. Technically, its not an extension — it just gives new meaning to markdowns native fenced code blocks — code blocks that start with a triple backtick, specifying a programming language.
Code widgets are a SilverBullet-specific [[Markdown/Extensions|extension]] to [[Markdown]]. Technically, its not an extension — it just gives new meaning to markdowns native fenced code blocks — code blocks that start with a triple backtick, specifying a programming language.
Currently, SilverBullet provides two code widgets as part of its built-in [[Plugs]]:
Currently, SilverBullet provides a few code widgets out of the box:
* `toc`: [[Table of Contents]]
* `query`: [[Live Queries]]
* `template`: [[Live Templates]]
* `embed`
* `markdown`
In addition, plugs like [[Plugs/KaTeX]] and [[Plugs/Mermaid]] add additional ones.
## Embed
This allows you to embed internet content into your page inside of an iframe. This is useful to, for instance, embed youtube videos. In fact, there is specific support for those.
Two examples.
First, embedding the silverbullet.md website inside the silverbullet.md website (inception!):
```embed
url: https://silverbullet.md
height: 500
```
## `embed`
This allows you to embed internet content into your page inside of an iframe. This is useful to embed youtube videos or other websites.
and a YouTube video:
```embed
url: https://www.youtube.com/watch?v=VemS-cqAD5k
url: https://youtu.be/BbNbZgOwB-Y
```
Note, there is specific support for YouTube videos — it automatically sets the width and height, and replaces the URL with an embed URL.
@@ -32,10 +25,3 @@ The body of an `embed` block is written in [[YAML]] and supports the following a
* `url` (mandatory): the URL of the content to embed
* `height` (optional): the height of the embedded page in pixels
* `width` (optional): the width of the embedded page in pixels
## Markdown
You can embed markdown inside of markdown and live preview it. Is this useful? 🤷 Not particularly, its more of a demo of how this works. Nevertheless, to each their own, heres an example:
```markdown
This is going to be **bold**
```
+1
View File
@@ -6,6 +6,7 @@ In addition to supporting [[Markdown/Basics|markdown basics]] as standardized by
* Generically via [[Markdown/Code Widgets]]
* [[Live Queries]]
* [[Live Templates]]
* [[Table of Contents]]
* [[Anchors]]
* [[Markdown/Admonitions]]
* Hashtags, e.g. `#mytag`.