Skip to content

Commit ab7a675

Browse files
Rename exampleTitle => title
1 parent 2cc30bf commit ab7a675

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

functions/Cursor/isCursorShowing.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ client:
3434
- path: 'examples/isCursorShowing-3.lua'
3535
description: |
3636
This example creates a function to set the state of the [player](/player)'s cursor using the [showCursor](/showCursor) function.
37-
exampleTitle: 'Toggle Cursor'
37+
title: 'Toggle Cursor'
3838
- path: 'examples/isCursorShowing-4.lua'
3939
description: |
4040
If you are already advanced in scripting, using this code is recommended, as it is much more compact:
4141
append: true
42-
exampleTitle: 'Toggle Cursor'
42+
title: 'Toggle Cursor (Advanced)'
4343
- path: 'examples/isCursorShowing-5.lua'
4444
description: |
4545
This example creates a function that allows the [player](/player) to change the state of the cursor using the [showCursor](/showCursor) and [bindKey](/bindKey) functions.
46-
exampleTitle: 'Toggle Cursor by binded key'
46+
title: 'Toggle Cursor by bound key'
4747
- path: 'examples/isCursorShowing-6.lua'
4848
description: |
4949
If you are already advanced in scripting, using this code is recommended, as it is much more compact:
5050
append: true
51-
exampleTitle: 'Toggle Cursor by binded key'
51+
title: 'Toggle Cursor by bound key (Advanced)'

schemas/common-defs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $defs:
118118
type: boolean
119119
default: false
120120
description: If set to true, this example will be appended to the previous example.
121-
exampleTitle:
121+
title:
122122
type: string
123123
description: Optional title displayed in the frame around the example.
124124
side:

web/src/components/CodeExamplesSection.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface CodeExample {
77
description?: string;
88
luaCode: string;
99
side: string;
10-
exampleTitle?: string;
10+
title?: string;
1111
}
1212
1313
export interface Props {
@@ -55,7 +55,7 @@ if (codeExamples.length === 0 && !examplesRequired) {
5555
}}
5656
>
5757
<div class={`tab-header side-${example.side} active`}>
58-
<strong>{example.side}</strong> {example.exampleTitle && ` - ${example.exampleTitle}`}
58+
<strong>{example.side}</strong> {example.title && ` - ${example.title}`}
5959
</div>
6060
<div class="tab-body">
6161
{example.description && <EnhancedMarkdown content={example.description} />}

0 commit comments

Comments
 (0)