Migrated silverbullet-publish into this repo

This commit is contained in:
Zef Hemel
2022-11-01 17:03:42 +01:00
parent 3d671e8195
commit c4f80589f3
18 changed files with 567 additions and 18 deletions
+5
View File
@@ -11,6 +11,11 @@ release.
* New PlugOS feature: redirecting function calls. Instead of specifying a `path` for a function, you can now specify `redirect` pointing to another function name, either in the same plug using the `plugName.functionName` syntax.
* `Cmd-click` or `Ctrl-click` now opens page references in a new window. You can `Alt-click` to put your cursor at the target without navigation.
* The `Create page` option when navigating pages now always appears as the _second_ option. Let me know how you like it.
* New `Preview` using a custom markdown renderer offering a lot of extra flexibility (and a much smaller file size). New thing it does:
* Render front matter in a table
* Makes {[Command buttons]} clickable
* Makes todo tasks toggleable
* Integrated the `silverbullet-publish` plug into core (to be better documented later).
---
+1
View File
@@ -1,4 +1,5 @@
{{#each .}}
{{@key}}: {{.}}
{{/each}}
---
+10 -9
View File
@@ -26,12 +26,13 @@ Whenever the directives are updated, the body of the directive will be replaced
$use
The `#use` directive can be used to use a referenced page as a handbars template. Optionally, a JSON object can be passed as argument to the template:
<!-- #use [[template/plug]] {"name": "Example plug", "repo": "https://google.com"} -->
<!-- #use [[template/plug]] {"name": "🔌 Directive", "repo": "https://google.com", "author": "Pete"} -->
<!-- /use -->
which renders as follows:
<!-- #use [[template/plug]] {"name": "Example plug", "repo": "https://google.com"} -->
* [[Example plug]] by **** ([repo](https://google.com))
<!-- #use [[template/plug]] {"name": "🔌 Directive", "repo": "https://google.com", "author": "Pete"} -->
* [[🔌 Directive]] by **Pete** ([repo](https://google.com))
<!-- /use -->
Note that a string is also a valid JSON value:
@@ -45,7 +46,7 @@ Note that a string is also a valid JSON value:
which renders as:
<!-- #use [[template/tagged-tasks]] "#test" -->
* [ ] [[🔌 Directive@1492]] This is a test task #test
* [ ] [[🔌 Directive@1537]] This is a test task #test
<!-- /use -->
## Eval
@@ -68,8 +69,8 @@ However, you can also invoke arbitrary plug functions, e.g. the `titleUnfurlOpti
Optionally, you can use a `render` clause to render the result as a template, similar to [[🔌 Directive/Query]]:
<!-- #eval core.titleUnfurlOptions() render [[template/debug]] -->
id: title-unfurl
name: Extract title
---
<!-- /eval -->
<!-- #eval core.titleUnfurlOptions() render [[template/debug]] -->
id: title-unfurl
name: Extract title
---
<!-- /eval -->