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

Using kit-docs as subpage inside a website #63

Open
Leomonay opened this issue Jul 29, 2022 · 1 comment
Open

Using kit-docs as subpage inside a website #63

Leomonay opened this issue Jul 29, 2022 · 1 comment

Comments

@Leomonay
Copy link

Hello! First of all, I searched for a community or forum to ask this, but I did not find one. So, please excuse me if this is not the right place where to ask.

I need to add a blog and documentation to my website. Using kit-docs for both of them.
The main idea is to set the links in the navbar, next to the other website pages. I could set both documentation and blog in the same website using different sources. The problems I have now are:

  • I want to use only one navBar. I can't set the website navbar in the kit-docs pages. And I can't render a page in a different route using kit-docs navbar.
  • I also need to do a different CSS for both blog and docs. I tried using different CSS imports for each __layout@kit.docs.svelte component. But the second page clicked overwrites the CSS variables of both pages. (if you click first blog and then docs, both pages use docs styles. And vice versa).

Here I leave the link of the repository.
Steps to check:

  1. Download this branch: https://gitlab.com/anagolay/blog/-/tree/1-build-blog-and-documentation-using-kitdocs
  2. pnpm install
  3. pnpm dev.
  4. Open the URL displayed at the console and click docs, then blog, and then back to docs.
  5. Go to home. Refresh. Click blog, then docs and then back to blog.

The question are:

  • What is the best way to set different styling for both kit-docs pages?
  • How can I render a single page below kit-docs navbar? or use website navbar for kit-docs pages?
    Thank you in advance!
@baradhili
Copy link

I've got a slightly different twist on a similar topic...

I'd like to use kitdocs as part of a svelte project to manage the docs alongside within the app - but it doesn't seem to be trivial to have kitdocs start at say "/docs" - unless I've missed something in the manual?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants