Skip to content

Commit b38cc16

Browse files
authored
Merge branch 'main' into joan/mobile-support
2 parents d9a910e + d431d4d commit b38cc16

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

docs/tutorialkit.dev/astro.config.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ export default defineConfig({
1919
light: './src/assets/brand/tutorialkit-logo-light.svg',
2020
replacesTitle: true,
2121
},
22-
plugins: [
23-
starlightLinksValidator({
24-
exclude: ['../../guides/**/*'],
25-
}),
26-
],
22+
plugins: [starlightLinksValidator()],
2723
sidebar: [
2824
{
2925
label: 'Guides',
@@ -41,10 +37,6 @@ export default defineConfig({
4137
label: 'Content creation',
4238
link: '/guides/creating-content/',
4339
},
44-
{
45-
label: 'Configuration',
46-
link: '/guides/configuration/',
47-
},
4840
{
4941
label: 'Deployment',
5042
link: '/guides/deployment/',
@@ -58,6 +50,10 @@ export default defineConfig({
5850
{
5951
label: 'Reference',
6052
items: [
53+
{
54+
label: 'Configuration',
55+
link: '/reference/configuration/',
56+
},
6157
{
6258
label: 'Theming',
6359
link: '/reference/theming/',

docs/tutorialkit.dev/src/content/docs/guides/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ This documentation will guide you through the steps to build your first interact
2121

2222
As the first step, see the [Installation](/guides/installation/) page to learn how to generate the project, and once you do, learn the basics of creating the content and corresponding code in [Creating a Lesson](/guides/creating-content/).
2323

24-
This will give you the basics needed to start compiling your training materials into an interactive onboarding experience. However, you'll likely want to customize that experience to fit your specific needs. For that, TutorialKit offers a range of configuration and theming options, which we have covered in the [Configuration](/guides/configuration) page.
24+
This will give you the basics needed to start compiling your training materials into an interactive onboarding experience. However, you'll likely want to customize that experience to fit your specific needs. For that, TutorialKit offers a range of configuration and theming options, which we have covered in the [Configuration](/reference/configuration) page.

docs/tutorialkit.dev/src/content/docs/guides/ui.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The preview displays the application which is a result of applying lesson files
4040

4141
<Image src={uiPreviewImage} alt="TutorialKit's Preview" />
4242

43-
Before your application template's dev server opens a port with something to be displayed, the preview shows the preparation steps such as "Installing dependencies", "Starting HTTP server" to indicate progress to the user. Note that you can customize these steps for each lesson, chapter or part of the tutorial (see: [prepareCommands](/guides/configuration/#preparecommands) reference).
43+
Before your application template's dev server opens a port with something to be displayed, the preview shows the preparation steps such as "Installing dependencies", "Starting HTTP server" to indicate progress to the user. Note that you can customize these steps for each lesson, chapter or part of the tutorial (see: [prepareCommands](/reference/configuration/#preparecommands) reference).
4444

4545
The preview updates in real-time as the user makes changes to the code, chooses to see the solution or navigates between lessons.
4646

docs/tutorialkit.dev/src/content/docs/reference/theming.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ For instanceof, here's an example of an info callout.
127127

128128
### Statuses
129129

130-
The statuses refer to the preview window that shows the status of the [`mainCommand`](../../guides/configuration#maincommand) and [`prepareCommands`](../../guides/configuration#preparecommands) commands.
130+
The statuses refer to the preview window that shows the status of the [`mainCommand`](/reference/configuration#maincommand) and [`prepareCommands`](/reference/configuration#preparecommands) commands.
131131

132132
![Statuses](./images/theming-statuses.png)
133133

@@ -464,7 +464,7 @@ The tooltip is the small popup that shows up when you hover over an item or when
464464

465465
### Terminal
466466

467-
The terminal refers to both a [read-only and an interactive terminal](../../guides/configuration#terminal).
467+
The terminal refers to both a [read-only and an interactive terminal](/reference/configuration#terminal).
468468

469469
![Terminal](./images/theming-terminal.png)
470470

packages/astro/src/index.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ export interface Options {
1515
*
1616
* Set this to false to customize the pages.
1717
*
18+
* Use 'tutorial-only' to only inject the tutorial routes. This is useful
19+
* if you want to have a different landing page.
20+
*
1821
* @default true
1922
*/
20-
defaultRoutes?: boolean;
23+
defaultRoutes?: boolean | 'tutorial-only';
2124

2225
/**
2326
* The value of the Cross-Origin-Embedder-Policy header for the dev server.
@@ -96,11 +99,13 @@ export default function createPlugin({ defaultRoutes = true, isolation, enterpri
9699
updateMarkdownConfig(options);
97100

98101
if (defaultRoutes) {
99-
injectRoute({
100-
pattern: '/',
101-
entrypoint: '@tutorialkit/astro/default/pages/index.astro',
102-
prerender: true,
103-
});
102+
if (defaultRoutes !== 'tutorial-only') {
103+
injectRoute({
104+
pattern: '/',
105+
entrypoint: '@tutorialkit/astro/default/pages/index.astro',
106+
prerender: true,
107+
});
108+
}
104109

105110
injectRoute({
106111
pattern: '[...slug]',

packages/components/react/src/CodeMirrorEditor/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function CodeMirrorEditor({
173173
view.setState(state);
174174

175175
setEditorDocument(view, theme, language, readOnly, autoFocusOnDocumentChange, doc as TextEditorDocument);
176-
}, [doc]);
176+
}, [doc?.value, doc?.filePath, doc?.loading]);
177177

178178
return (
179179
<div className="h-full relative">

0 commit comments

Comments
 (0)