Skip to content

Commit a1d4f3c

Browse files
docs: add docs for defaultRoutes (#365)
1 parent 6f5195e commit a1d4f3c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,47 @@ type OpenInStackBlitz =
403403
type TemplateType = "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue"
404404
405405
```
406+
407+
## Configure the Tutorialkit Astro integration
408+
409+
`@tutorialkit/astro` is an integration for Astro. You can configure the integration in your `astro.config.ts` file.
410+
411+
```ts "tutorialkit()" title="astro.config.ts"
412+
import tutorialkit from "@tutorialkit/astro";
413+
import { defineConfig } from "astro/config";
414+
415+
export default defineConfig({
416+
devToolbar: {
417+
enabled: false,
418+
},
419+
integrations: [
420+
tutorialkit(),
421+
],
422+
});
423+
```
424+
425+
You can pass the following options to the `tutorialkit` integration:
426+
427+
### `components`
428+
429+
**type**: `OverrideComponentsOptions`
430+
431+
Provide the path to the components you want to override.
432+
433+
```ts
434+
tutorialkit({
435+
components: {
436+
TopBar: './src/components/CustomTopBar.astro',
437+
},
438+
});
439+
```
440+
441+
See [Overriding Components](/guides/overriding-components/) for details of all the components that you can override.
442+
443+
### `defaultRoutes`
444+
445+
**type**: `boolean | "tutorial-only"`<br/>
446+
**default**: `true`
447+
448+
Controls whether the tutorial routes are automatically added to your project. When set to `true`, it additionally adds a redirect from `/` to the first tutorial.
449+
Use `"tutorial-only"` to only add the tutorial routes without the redirect.

0 commit comments

Comments
 (0)