Using kit-docs as subpage inside a website
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
[email protected]component. But the second page clicked overwrites the CSS variables of both pages. (if you click firstblogand thendocs, both pages usedocsstyles. And vice versa).
Here I leave the link of the repository. Steps to check:
- Download this branch: https://gitlab.com/anagolay/blog/-/tree/1-build-blog-and-documentation-using-kitdocs
- pnpm install
- pnpm dev.
- Open the URL displayed at the console and click docs, then blog, and then back to docs.
- 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!
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?