Skip to content

Commit 08910ff

Browse files
committed
mention more advance bind target features
1 parent 8aa0823 commit 08910ff

File tree

7 files changed

+37
-29
lines changed

7 files changed

+37
-29
lines changed

astro.config.mjs

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default defineConfig({
3131
{ label: 'Styling and CSS', link: '/guides/stylingandcss/' },
3232
{ label: 'Obsidian Publish', link: '/guides/obsidianpublish/' },
3333

34-
{
34+
{
3535
label: 'Features and Concepts',
3636
items: [
3737
{ label: 'Input Fields', link: '/guides/inputfields/' },
@@ -40,16 +40,16 @@ export default defineConfig({
4040
{ label: 'Buttons', link: '/guides/buttons/' },
4141
{ label: 'Meta Bind Embeds', link: '/guides/metabindembed/' },
4242
{ label: 'Bind Targets', link: '/guides/bindtargets/' },
43-
]
43+
],
4444
},
4545

4646
{
4747
label: 'Advanced',
4848
items: [
4949
{ label: 'API', link: '/guides/api/' },
5050
{ label: 'Advanced Use-Cases', link: '/guides/advancedusecases/' },
51-
]
52-
}
51+
],
52+
},
5353
],
5454
},
5555
{
@@ -105,30 +105,26 @@ export default defineConfig({
105105
},
106106
}),
107107
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-
// },
122108
graphConfig: {
123109
depth: 5,
124-
trackVisitedPages: false,
110+
visibilityRules: ['api/**'],
125111
},
112+
trackVisitedPages: false,
126113
storageLocation: 'none',
127-
contentRoot: './src/content/docs',
128-
include_sitemap: ['./api/*/**/*.md'],
129-
exclude_sitemap: ['**'],
130-
show_graph: ['api/**'],
131-
hide_graph: ['**', ''],
114+
sitemapConfig: {
115+
contentRoot: './src/content/docs',
116+
pageInclusionRules: ['**/api/**'],
117+
},
118+
// graphConfig: {
119+
// depth: 5,
120+
// trackVisitedPages: false,
121+
// },
122+
// storageLocation: 'none',
123+
// contentRoot: './src/content/docs',
124+
// include_sitemap: ['./api/*/**/*.md'],
125+
// exclude_sitemap: ['**'],
126+
// show_graph: ['api/**'],
127+
// hide_graph: ['**', ''],
132128
}),
133129
],
134130
}),

bun.lockb

-2.09 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"astro": "4.15.4",
1616
"pixi-stats": "^1.3.10",
1717
"starlight-links-validator": "^0.12.0",
18-
"starlight-site-graph": "0.0.13",
18+
"starlight-site-graph": "0.1.1",
1919
"starlight-typedoc": "^0.16.0",
2020
"typedoc": "^0.26.7",
2121
"typedoc-plugin-markdown": "^4.2.7",

public/sitegraph/sitemap.json

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

src/content/docs/guides/api.mdx

Lines changed: 2 additions & 2 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,7 +44,7 @@ if (!mb) {
4444
}
4545
4646
// Now we can use the API!
47-
```
47+
````
4848
4949
</TabItem>
5050
</Tabs>

src/content/docs/guides/inputFields.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,20 @@ First, we create a toggle.
3838
INPUT[toggle]
3939
```
4040

41-
Then we tell it to bind to the `completed` frontmatter field.
41+
Then we tell it to bind to the `completed` frontmatter field using a [Bind Target](/obsidian-meta-bind-plugin-docs/guides/bindtargets).
4242

4343
```meta-bind ":completed"
4444
INPUT[toggle:completed]
4545
```
4646

4747
And our input field is working. The toggle will change the frontmatter and when the frontmatter changes, the toggle changes.
4848

49+
Of course you can utilize the full functionality of [Bind Targets](/obsidian-meta-bind-plugin-docs/guides/bindtargets) with input field. E.g. the following is possible.
50+
51+
```meta-bind ":memory^completed"
52+
INPUT[toggle:memory^completed]
53+
```
54+
4955
:::note
5056
Specifying a bind target is optional, but recommended.
5157

src/content/docs/guides/viewFields.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ Distance in freedom units: `VIEW[round(number({distance} km, miles), 2)]` miles
4646
```
4747

4848
The references to the frontmatter in the curly brackets follow the same [Bind Target](/obsidian-meta-bind-plugin-docs/guides/bindtargets) rules as the bind target for input fields.
49+
So if for some reason you want to not persist the value to the frontmatter, you can use the `memory` storage type.
50+
51+
```custom_markdown "memory^distance"
52+
Distance: `INPUT[number:memory^distance]` km
53+
Distance in freedom units: `VIEW[round(number({memory^distance} km, miles), 2)]` miles
54+
```
4955

5056
## View Field Types
5157

0 commit comments

Comments
 (0)