Skip to content

Commit e38588a

Browse files
committed
small improvements
1 parent 1cd45b9 commit e38588a

File tree

9 files changed

+57
-45
lines changed

9 files changed

+57
-45
lines changed

bun.lockb

41.6 KB
Binary file not shown.

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
2-
"name": "",
3-
"type": "module",
4-
"version": "0.0.1",
5-
"scripts": {
6-
"dev": "astro dev",
7-
"start": "astro dev",
8-
"build": "astro build",
9-
"preview": "astro preview",
10-
"astro": "astro",
11-
"format": "prettier --plugin prettier-plugin-astro --plugin prettier-plugin-svelte --write ."
12-
},
13-
"dependencies": {
14-
"@astrojs/starlight": "^0.22.3",
15-
"astro": "^4.8.3",
16-
"starlight-links-validator": "^0.8.0",
17-
"starlight-typedoc": "^0.12.1",
18-
"typedoc": "^0.25.13",
19-
"typedoc-plugin-markdown": "4.0.0-next.60",
20-
"typedoc-plugin-mdn-links": "^3.1.25"
21-
},
22-
"devDependencies": {
23-
"prettier": "^3.2.5",
24-
"prettier-plugin-astro": "^0.13.0",
25-
"prettier-plugin-svelte": "^3.2.3"
26-
}
2+
"name": "",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro build",
9+
"preview": "astro preview",
10+
"astro": "astro",
11+
"format": "prettier --plugin prettier-plugin-astro --plugin prettier-plugin-svelte --write ."
12+
},
13+
"dependencies": {
14+
"@astrojs/starlight": "^0.23.2",
15+
"astro": "^4.8.3",
16+
"starlight-links-validator": "^0.8.0",
17+
"starlight-typedoc": "^0.12.1",
18+
"typedoc": "^0.25.13",
19+
"typedoc-plugin-markdown": "4.0.0-next.60",
20+
"typedoc-plugin-mdn-links": "^3.1.25"
21+
},
22+
"devDependencies": {
23+
"prettier": "^3.2.5",
24+
"prettier-plugin-astro": "^0.13.0",
25+
"prettier-plugin-svelte": "^3.2.3"
26+
}
2727
}

src/content/docs/guides/advancedUseCases.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: Advanced Use-Cases
33
description: A collection of more advanced use-cases.
44
---
55

6-
If you are willing to dip your toes into the world of JavaScript, you can do quite a few interesting things with Meta Bind.
6+
If you are willing to dip your toes into the world of [JavaScript](https://developer.mozilla.org/en-US/docs/Learn/JavaScript), you can do quite a few interesting things with Meta Bind.
77

88
:::note
99
The following examples assume that you have:
1010
1. [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) installed and enabled.
11-
2. Enabled **JS Input Fields** in the Meta Bind settings.
11+
2. Enabled **JavaScript** in the Meta Bind settings.
1212
:::
1313

1414
:::caution

src/content/docs/guides/bindTargets.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Bind Targets consist of three parts.
2121
storageType^storagePath#property
2222
```
2323

24-
Certain parts can be omitted, causing them to default to their default values.
24+
The `storageType` and `storagePath` can be omitted, causing them to default to their default values.
2525

2626
The following bind target will always use the default storage type `frontmatter`,
2727
meaning it points to a frontmatter property.
@@ -30,14 +30,17 @@ meaning it points to a frontmatter property.
3030
storagePath#property
3131
```
3232

33-
The following bind targets will always use the current file as the storage path.
33+
The following bind targets will always use the containing file as the storage path.
34+
Containing file means the file the bind target or field, that the bind target is part of, is in.
3435

3536
```meta-bind
3637
property
3738
3839
storageType^property
3940
```
4041

42+
### Default Values Example
43+
4144
This means that the following bind targets are **equivalent**, assuming the current file is `Test Note`.
4245

4346
```meta-bind
@@ -76,7 +79,8 @@ Global Memory is shared between all notes and **will be lost** when you restart
7679
### 2. The Storage Path
7780

7881
The storage path usually points to a file.
79-
If omitted, it defaults to the current file.
82+
If omitted, it defaults to the containing file.
83+
Containing file means the file the bind target or field, that the bind target is part of, is in.
8084

8185
#### Example
8286

src/content/docs/guides/obsidianPublish.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,14 @@ description: A tutorial for setting up Meta Bind to work in publish.
55

66
:::danger
77

8-
The publish version of Meta Bind is quite a burden for me to maintain, so it has been falling behind the main version.
9-
The current publish version probably **won't work**.
8+
I am currently waiting for the Obsidian Team to deliver on promised improvements to the Obsidian Publish API.
9+
Until then, Meta Binds publish support will be broken.
1010

11-
Use at your own risk until I can find the time to fix it.
11+
Use at your own risk. I do not accept issues and feature requests for publish specific issues at this point in time.
1212

1313
:::
1414

1515
This guide assumes that you already have Obsidian Publish set up with a custom domain, so that you can use a `publish.js` file.
1616

1717
To get meta bind working in Obsidian Publish, you need to copy the contents of [this file](https://github.com/mProjectsCode/obsidian-meta-bind-plugin/blob/master/PublishLoad.js) into your `publish.js` file.
18-
For the correct appearance, you need to copy [this file](https://github.com/mProjectsCode/obsidian-meta-bind-plugin/blob/master/styles.css) into your `publish.css` file.
19-
20-
## What it can do and what it can't
21-
22-
For input fields, due to the limited publish API, the plugin will only display the bound metadata instead of showing input field.
23-
24-
View fields should be mostly functional.
25-
26-
Binding to metadata of a different note is not possible for both fields.
18+
For the correct appearance, you need to copy [this file](https://github.com/mProjectsCode/obsidian-meta-bind-plugin/blob/master/styles.css) into your `publish.css` file.

src/content/docs/guides/viewFields.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ Those can only be created as code blocks and **not inline**.
142142
By default, JS View Fields are disabled, as they can pose a security risk.
143143

144144
:::note
145-
This requires the [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) plugin to be installed and enabled.
145+
This feature requires the that you have the following:
146+
147+
1. [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) installed and enabled.
148+
2. Enabled **JavaScript** in the Meta Bind settings.
146149
:::
147150

148151
JS View Fields consist of two sections, separated by `---`.

src/content/docs/reference/buttonActions/inlineJs.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ description: Inline JS button action reference.
66
The inline JS action runs the code provided using the JS Engine plugin.
77

88
:::note
9-
This requires the [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) plugin to be installed and enabled.
9+
This feature requires the that you have the following:
10+
11+
1. [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) installed and enabled.
12+
2. Enabled **JavaScript** in the Meta Bind settings.
1013
:::
1114

1215
```ts

src/content/docs/reference/buttonActions/runJavaScript.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ description: Run JavaScript File button action reference.
66
The run JavaScript file action runs a JavaScript file.
77

88
:::note
9-
This requires the [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) plugin to be installed and enabled.
9+
This feature requires the that you have the following:
10+
11+
1. [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) installed and enabled.
12+
2. Enabled **JavaScript** in the Meta Bind settings.
1013
:::
1114

1215
```ts

src/content/docs/reference/buttonActions/updateMetadata.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ interface UpdateMetadataButtonAction {
1818
If `evaluate` is set to `true`, the value is treated as a JavaScript expression and evaluated.
1919
The current value of the property is available in the expression as `x`.
2020

21+
:::note
22+
The evaluate feature requires that you have the following:
23+
24+
1. [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) installed and enabled.
25+
2. Enabled **JavaScript** in the Meta Bind settings.
26+
:::
27+
2128
#### Example
2229

2330
This button group allows you to increment, decrement, and reset a counter stored in the frontmatter of the current file.

0 commit comments

Comments
 (0)