Skip to content

Commit 8aa0823

Browse files
committed
update stuff
1 parent 3267df4 commit 8aa0823

File tree

7 files changed

+73
-29
lines changed

7 files changed

+73
-29
lines changed

astro.config.mjs

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,29 @@ export default defineConfig({
2727
items: [
2828
// Each item here is one entry in the navigation menu.
2929
{ label: 'Installation', link: '/guides/installation/' },
30-
{ label: 'Input Fields', link: '/guides/inputfields/' },
31-
{ label: 'Input Field Templates', link: '/guides/templates/' },
32-
{ label: 'View Fields', link: '/guides/viewfields/' },
33-
{ label: 'Buttons', link: '/guides/buttons/' },
34-
{ label: 'Meta Bind Embeds', link: '/guides/metabindembed/' },
35-
{ label: 'Bind Targets', link: '/guides/bindtargets/' },
36-
3730
{ label: 'Examples', link: '/guides/examples/' },
38-
{ label: 'Advanced Use-Cases', link: '/guides/advancedusecases/' },
39-
{ label: 'API', link: '/guides/api/' },
40-
4131
{ label: 'Styling and CSS', link: '/guides/stylingandcss/' },
4232
{ label: 'Obsidian Publish', link: '/guides/obsidianpublish/' },
33+
34+
{
35+
label: 'Features and Concepts',
36+
items: [
37+
{ label: 'Input Fields', link: '/guides/inputfields/' },
38+
{ label: 'Input Field Templates', link: '/guides/templates/' },
39+
{ label: 'View Fields', link: '/guides/viewfields/' },
40+
{ label: 'Buttons', link: '/guides/buttons/' },
41+
{ label: 'Meta Bind Embeds', link: '/guides/metabindembed/' },
42+
{ label: 'Bind Targets', link: '/guides/bindtargets/' },
43+
]
44+
},
45+
46+
{
47+
label: 'Advanced',
48+
items: [
49+
{ label: 'API', link: '/guides/api/' },
50+
{ label: 'Advanced Use-Cases', link: '/guides/advancedusecases/' },
51+
]
52+
}
4353
],
4454
},
4555
{
@@ -95,6 +105,20 @@ export default defineConfig({
95105
},
96106
}),
97107
starlightSiteGraph({
108+
// graphConfig: {
109+
// depth: 5,
110+
// visibilityRules: [
111+
// 'api/**'
112+
// ]
113+
// },
114+
// trackVisitedPages: false,
115+
// storageLocation: 'none',
116+
// sitemapConfig: {
117+
// contentRoot: './src/content/docs',
118+
// pageInclusionRules: [
119+
// '**/api/**',
120+
// ]
121+
// },
98122
graphConfig: {
99123
depth: 5,
100124
trackVisitedPages: false,

bun.lockb

2.58 KB
Binary file not shown.

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
"format": "prettier --plugin prettier-plugin-astro --plugin prettier-plugin-svelte --write ."
1212
},
1313
"dependencies": {
14-
"@astrojs/starlight": "0.26.1",
15-
"astro": "4.14.2",
16-
"starlight-links-validator": "^0.9.1",
14+
"@astrojs/starlight": "0.27.1",
15+
"astro": "4.15.4",
16+
"pixi-stats": "^1.3.10",
17+
"starlight-links-validator": "^0.12.0",
1718
"starlight-site-graph": "0.0.13",
18-
"starlight-typedoc": "^0.14.0",
19-
"typedoc": "^0.26.6",
20-
"typedoc-plugin-markdown": "^4.2.5",
21-
"typedoc-plugin-mdn-links": "^3.2.9",
22-
"typescript": "^5.5.4"
19+
"starlight-typedoc": "^0.16.0",
20+
"typedoc": "^0.26.7",
21+
"typedoc-plugin-markdown": "^4.2.7",
22+
"typedoc-plugin-mdn-links": "^3.2.12",
23+
"typescript": "^5.6.2"
2324
},
2425
"devDependencies": {
2526
"prettier": "^3.3.3",

public/sitegraph/sitemap.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/content/docs/guides/api.mdx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if (!mb) {
2929

3030
// Now we can use the API!
3131

32-
````
32+
```
3333
</TabItem>
3434
<TabItem label="Plain JavaScript">
3535
```js
@@ -44,19 +44,28 @@ if (!mb) {
4444
}
4545

4646
// Now we can use the API!
47-
````
47+
```
4848
4949
</TabItem>
5050
</Tabs>
5151
5252
:::caution
53-
Do not destructure the API object like this. This will lead to errors, as the class method looses it's reference to itself via `this`.
53+
Do not try to use API methods as standalone functions. This will lead to errors, as the class method looses it's reference to itself via `this`.
5454
5555
```js
56+
// DON'T DO THIS
5657
const { someAPIMethod } = app.plugins.getPlugin('obsidian-meta-bind-plugin')?.api;
58+
someAPIMethod(); // will most likely error
59+
// OR
60+
const someAPIMethod = app.plugins.getPlugin('obsidian-meta-bind-plugin')?.api.someAPIMethod;
61+
someAPIMethod(); // will most likely error
62+
63+
// DO THIS
64+
const mb = app.plugins.getPlugin('obsidian-meta-bind-plugin')?.api;
65+
mb.someAPIMethod(); // works
5766
```
5867
59-
This is a general issue with object destructuring and JavaScript classes.
68+
This is a general issue with JavaScript classes.
6069
6170
```js
6271
class Foo {
@@ -75,6 +84,10 @@ foo.baz(); // will log 5
7584
const { baz } = foo;
7685
// `baz` became a standalone function and thus `this` is now `undefined`.
7786
baz(); // error: can't access property `bar`, `this` is `undefined`
87+
88+
const baz2 = foo.baz;
89+
// `baz2` became a standalone function and thus `this` is now `undefined`.
90+
baz2(); // error: can't access property `bar`, `this` is `undefined`
7891
```
7992
8093
:::

src/content/docs/guides/inputFields.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ To add options to the dropdown select we will use the `option(name)` argument.
6262

6363
```meta-bind
6464
INPUT[inlineSelect(
65-
option(trash),
6665
option(bad),
66+
option(meh),
6767
option(ok),
6868
option(good),
6969
option(great)
@@ -76,8 +76,8 @@ If we want numeric values to represent the rating in our frontmatter, we can pas
7676

7777
```meta-bind
7878
INPUT[inlineSelect(
79-
option(1, trash),
80-
option(2, bad),
79+
option(1, bad),
80+
option(2, meh),
8181
option(3, ok),
8282
option(4, good),
8383
option(5, great)
@@ -88,7 +88,7 @@ We can also include commas in our value names by surrounding them with quotes.
8888

8989
```meta-bind
9090
INPUT[inlineSelect(
91-
option(1, 'trash, do not watch'),
91+
option(1, 'if you value your time, do not watch'),
9292
...
9393
):rating]
9494
```
@@ -97,7 +97,7 @@ Such strings also support escaping using a backslash. To have a single backslash
9797

9898
```meta-bind
9999
INPUT[inlineSelect(
100-
option(1, 'trash, don\'t watch'),
100+
option(1, 'if you value your time, don\'t watch'),
101101
...
102102
):rating]
103103
```

src/content/docs/guides/installation.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ Canary build might contain new features that are **not yet ready** and therefore
2020
These feature previews may introduce **breaking changes without warning**.
2121
There is no changelog for canary builds.
2222

23-
You can install canary builds via [BRAT](https://github.com/TfTHacker/obsidian42-brat).
24-
2523
If you don't know if you are using a canary build, you can look at the version number in the Obsidian settings.
2624
Canary builds have a version number ending in `-canary` plus a timestamp, e.g. `0.9.0-canary.20231129T131457`.
25+
26+
Canary builds can be installed using BRAT by following the steps outlined below.
27+
28+
1. Install and enable the BRAT plugin
29+
2. Run the BRAT: Plugins: Add a beta plugin for testing command
30+
3. Enter https://github.com/mProjectsCode/obsidian-meta-bind-plugin into the text field
31+
4. Click on Add Plugin

0 commit comments

Comments
 (0)