-
Notifications
You must be signed in to change notification settings - Fork 84
docs: add github icon on top of demo.tutorialkit.dev TopBar #338
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @Charan167!
This PR should only make changes to docs/demo/**
files. Couple of changes below:
- move the
Github.tsx
todocs/demo/src/components/Github.tsx
- add
docs/demo/src/components/TopBar.tsx
with following:--- import Github from "./Github"; --- <nav class="bg-tk-elements-topBar-backgroundColor transition-theme border-b border-tk-elements-app-borderColor flex max-w-full items-center p-3 px-4 min-h-[56px]" > <div class="flex flex-1"> <slot name="logo" /> </div> <div class="mr-2"> <slot name="open-in-stackblitz-link" /> </div> <Github /> <div> <slot name="theme-switch" /> </div> <div> <slot name="login-button" /> </div> </nav>
- define
components.TopBar
indocs/demo/astro.config.ts
like this: https://github.com/AriPerkkio/tutorial-vite-plugin/pull/7/files#diff-baf06eda15601b59413c77e1f18884403033204061e6c9408cd9a3bb5bc6e586R10-R12
Now you should see the icon when running pnpm dev
in docs/demo
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Moved Github.tsx to docs/demo/src/components/Github.tsx
- Defined components.TopBar in docs/demo/astro.config.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @Charan167! 🎉
If you want to work more on improving the demo site, good next task would be to add editPageLink
there: https://tutorialkit.dev/reference/configuration/#editpagelink.
@AriPerkkio Sure!!! I've made the changes by adding editpagelink in the lesson’s frontmatter block. Please confirm if it's supposed to work like this. Recording.2024-09-20.215159.mp4 |
Yes, that's the intention. But it looks like the link is not working. Maybe the URL is not correct? Here's Tutorial that has correctly working edit page link: https://tutorial-vite-plugin.pages.dev |
@AriPerkkio Thank you for your help!!! I missed the demo part again 😅. I've made the necessary changes and created a PR. |
Recording.2024-09-19.214117.mp4