Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docs for defaultRoutes #365

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,47 @@ type OpenInStackBlitz =
type TemplateType = "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue"

```

## Configure the Tutorialkit Astro integration

`@tutorialkit/astro` is an integration for Astro. You can configure the integration in your `astro.config.ts` file.

```ts "tutorialkit()" title="astro.config.ts"
import tutorialkit from "@tutorialkit/astro";
import { defineConfig } from "astro/config";

export default defineConfig({
devToolbar: {
enabled: false,
},
integrations: [
tutorialkit(),
],
});
```

You can pass the following options to the `tutorialkit` integration:

### `components`

**type**: `OverrideComponentsOptions`

Provide the path to the components you want to override.

```ts
tutorialkit({
components: {
TopBar: './src/components/CustomTopBar.astro',
},
});
```

See [Overriding Components](/guides/overriding-components/) for details of all the components that you can override.

### `defaultRoutes`

**type**: `boolean | "tutorial-only"`<br/>
**default**: `true`

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.
Use `"tutorial-only"` to only add the tutorial routes without the redirect.
Loading