0

I am totally new to UI and Astro project. I am using astrowind (astro framework) theme to modify the website.

I am looking to develop a site which will have pages of content about the site/product and also wanted to include a documentation on a single page with contents rendering when the user clicks a sidebar.

I know there is a separate framework for rendering docs only (docs.astro.com). But is there a way to integrate this together and deploy it as a single site ?

Something like below, with clickable links on left side navbar to new display content on right. May be someone has worked on similar component before.

PS: I have no skill to develop a component, but can try if there are any references.

enter image description here

asked Oct 21, 2024 at 11:56
2
  • 1
    Perhaps you're looking for starlight.astro.build ? Commented Oct 21, 2024 at 13:22
  • 1
    Thanks, I thought starlight was a standalone docs page. I went through the documentation and was able to achieve this. Thanks a lot. Commented Oct 21, 2024 at 14:50

1 Answer 1

0

So, I was able to integrate starlight with astrowind using the documentation given in the site.

Content from astro.config.ts

integrations: [
tailwind({
 applyBaseStyles: false,
}),
sitemap(),
starlight({
 title: 'Docs',
 tableOfContents: false,
 sidebar: [
 // A single link item labelled "Home".
 { label: 'Home', link: '/guides' },
 { label: 'Home', link: '/guides/about' },
 ],
}),
mdx(),

Added below in config.ts

export const collections = {
 post: postCollection,
 docs: defineCollection({ schema: docsSchema() }),
};

Then the src/content directory structure,

├── content
│ ├── config.ts
│ ├── docs
│ │ └── guides
│ │ ├── about.mdx
│ │ └── index.mdx
│ └── post
│ ├── astrowind-template-in-depth.mdx
answered Oct 21, 2024 at 14:54
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.