mirror of
https://github.com/meld-cp/obsidian-build.git
synced 2026-07-22 07:30:25 +00:00
update docs
This commit is contained in:
parent
c937346571
commit
bf9d1fc259
2 changed files with 39 additions and 5 deletions
|
|
@ -30,9 +30,6 @@ await $.ui.message( `From this day forth you shall be known as ${ans}` );
|
|||
- [Guess The Number Game (Using Markers)](/docs/examples/guess-the-number-marker.md)
|
||||
- [Simple Invoice Builder](/docs/examples/invoice-builder.md)
|
||||
|
||||
## Known Issues
|
||||
- If you quickly try to run a note just after some changes, there's a chance that the Obsidian cache hasn't been updated yet. The workaround for now is to wait a second or two before running a changed note.
|
||||
|
||||
## Manually installing the plugin
|
||||
|
||||
- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/meld-build/`.
|
||||
|
|
|
|||
|
|
@ -25,6 +25,25 @@ Within the current note:
|
|||
|
||||
---
|
||||
|
||||
## Tagging and Grouping `meld-build` codeblocks
|
||||
|
||||
It is possible to tag codeblocks for targeted runs using the `meld-build-toolbar`.
|
||||
|
||||
For instance, the following codeblock is tagged with `init`
|
||||
````md
|
||||
```js meld-build init
|
||||
await $.ui.message('This is the init codeblock');
|
||||
````
|
||||
|
||||
Multiple codeblocks with the same tag will be concatinated together before running.
|
||||
|
||||
To skip a codeblock all together, use the `skip` tag like this:
|
||||
````md
|
||||
```js meld-build skip
|
||||
await $.ui.message("This won't run");
|
||||
````
|
||||
---
|
||||
|
||||
## Toolbar
|
||||
|
||||
To make running `meld-build` codeblocks easier you can add the following codeblock to show a toolbar.
|
||||
|
|
@ -34,7 +53,25 @@ To make running `meld-build` codeblocks easier you can add the following codeblo
|
|||
```
|
||||
````
|
||||
|
||||
_TODO: add screenshot_
|
||||
By default you will see a `Run` and a `Help` button.
|
||||
|
||||
You can configure the labels of buttons like this:
|
||||
````md
|
||||
```meld-build-toolbar
|
||||
run = Run Me!
|
||||
help = SOS
|
||||
```
|
||||
````
|
||||
|
||||
To define a run buttons which targets codeblock tags, use:
|
||||
````md
|
||||
```meld-build-toolbar
|
||||
run|init = Run the Init Code
|
||||
run|main = Run Code tagged with main
|
||||
run = Run the Non-tagged Code
|
||||
```
|
||||
````
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -157,7 +194,7 @@ await $.ui.message(x);
|
|||
|
||||
## Other
|
||||
- It's recommended to turn `on` the `Files & Links > Detect all file extensions` option in Obsidian. This will make working with files for templating easier.
|
||||
|
||||
- Hint: add `//@hide_when_reading` to a `JavaScript` codeblock to hide it in Reading mode.
|
||||
---
|
||||
|
||||
## More Information
|
||||
|
|
|
|||
Loading…
Reference in a new issue