Skip to content

Commit 6e9ade5

Browse files
committed
add usage page for startup-scripts
1 parent 5889c7e commit 6e9ade5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Startup-Scripts
3+
description: A guide on how to use startup-scripts.
4+
---
5+
6+
JS-Engine supports startup-scripts, similar to the CSS-snippets from Core-Obsidian.
7+
8+
You can select the script-file you want to use as startup-scripts and JS-Engine will run them for you when never Obsidian starts up.
9+
10+
:::note
11+
Different from Core-Obsidian, JS-Engine startup-scripts can not be stored inside the `.obsidian/` folder.
12+
They need to be somewhere inside your vault.
13+
:::
14+
15+
## Configuring Startup-Scripts
16+
17+
You can configure which files you want to have run from JS-Engines settings tab.
18+
There you will see a list of all JavaScript files detected inside the vault and
19+
you can enable the ones you want to run at startup.
20+
21+
### Setting a folder for startup-scripts
22+
23+
To reduce the list of shown files you can define the name of a folder you use to store your scripts.
24+
JS-Engine will only check that folder and only list files inside it as options.
25+
26+
## Global Variables
27+
28+
JS-Engine runs the scripts in the same context as all other code-blocks.
29+
So the available global variable are the same and can be found [here](/obsidian-js-engine-plugin-docs/api/classes/api/).

0 commit comments

Comments
 (0)