Skip to content

docs: TopBar override to mention open-in-stackblitz-link slot #324

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

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions docs/tutorialkit.dev/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export default defineConfig({
'Cross-Origin-Opener-Policy': 'same-origin',
},
},
vite: {
ssr: {
noExternal: '@tutorialkit/react',
},
},
Comment on lines +16 to +20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change do?

Copy link
Member Author

@AriPerkkio AriPerkkio Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, locally run pnpm run docs crashes when react components page is opened in browser.

I verified that documentation still works after this change by running pnpm run build; pnpm run preview for the docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woow I did noticed that once but thought it might have been my local environment having a bug!!

Really good find! 🤩

Thanks for the explanation 👍

integrations: [
react(),
UnoCSS(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ tutorialkit({
When overriding `TopBar` you can place TutorialKit's default components using following [Astro slots](https://docs.astro.build/en/basics/astro-components/#named-slots):

- `logo`: Logo of the application
- `open-in-stackblitz-link`: Link for opening current lesson in StackBlitz
- `theme-switch`: Switch for changing the theme
- `login-button`: For StackBlitz Enterprise user, the login button

Expand All @@ -59,6 +60,8 @@ When overriding `TopBar` you can place TutorialKit's default components using fo

<LanguageSelect />

<slot name="open-in-stackblitz-link" />

<slot name="login-button" />
</nav>
```