Skip to content

Commit d70ebaf

Browse files
Merge pull request #11 from reply2za/master
Add runTemplaterFile documentation
2 parents 2f351cd + 2f3adaf commit d70ebaf

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Run Templater File
3+
description: Run Templater File button action reference.
4+
---
5+
6+
Executes all [Templater](https://github.com/SilentVoid13/Templater) templates within a single file.
7+
8+
```ts
9+
interface RunTemplaterFileButtonAction {
10+
type: 'runTemplaterFile';
11+
templateFile: string; // the path to the template file, relative to the vault root
12+
}
13+
```
14+
15+
### Examples
16+
17+
#### Banner Notice
18+
19+
This will display a banner with the title of the file you are in.
20+
21+
##### Button
22+
23+
````custom_markdown {5-8}
24+
```meta-bind-button
25+
style: primary
26+
label: Say Filename
27+
actions:
28+
- type: runTemplaterFile
29+
templateFile: "templates/Notice.md"
30+
```
31+
````
32+
33+
##### File (Notice.md)
34+
35+
```js
36+
<%*
37+
new Notice(tp.file.title);
38+
%>
39+
```

0 commit comments

Comments
 (0)