Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d5acd25
feat: add DocsSidebar component for navigation with collapsible menu
rudy128 Jan 7, 2026
d51906d
fix: improve active item detection in DocsSidebar for better folder e…
rudy128 Jan 7, 2026
16d8849
feat: enhance DocsSidebar with dynamic height adjustment and improved…
rudy128 Jan 8, 2026
dc7f7fc
feat: add SidebarFooter component with theme toggle and collapse func…
rudy128 Jan 8, 2026
3a23f3f
feat: integrate SidebarFooter component for enhanced sidebar function…
rudy128 Jan 8, 2026
b592d7d
feat: add ThemeToggle component for theme switching functionality and…
rudy128 Jan 8, 2026
5e7b91a
feat: implement DocsLayout component for structured documentation lay…
rudy128 Jan 8, 2026
4fc402e
feat: enhance DocsSidebar and SidebarFooter components with dynamic h…
rudy128 Jan 8, 2026
1f9439e
fix: scroll issue on page end
rudy128 Jan 8, 2026
ad64948
fix: update button hover styles in SidebarFooter for consistent dark …
rudy128 Jan 8, 2026
f594cae
fix: improved dark light theme compatibilty
rudy128 Jan 9, 2026
608ad4d
refactor: DocsBanner component to improve structure and add dismiss f…
rudy128 Jan 10, 2026
c8d384b
feat: add TableOfContents component with dynamic scrolling and theme …
rudy128 Jan 10, 2026
e26e3d1
feat: implement DocsProvider component with context for menu and side…
rudy128 Jan 10, 2026
fc2d83a
fix: simplify TableOfContents rendering and adjust main content layout
rudy128 Jan 10, 2026
11860b7
refactor: removed nextra-theme-docs
rudy128 Jan 10, 2026
c7acad1
refactor: replace nextra-theme-docs with custom MDX components and in…
rudy128 Jan 10, 2026
48f92b8
refactor: replace nextra-theme-docs with custom layout and improve st…
rudy128 Jan 10, 2026
e68c2dd
refactor: update type for frontMatter and enhance SidebarFooter styli…
rudy128 Jan 10, 2026
899f6f3
refactor: extract TOCLink component for improved readability and styl…
rudy128 Jan 10, 2026
86ad01b
feat: add MobileTOC component for responsive table of contents with a…
rudy128 Jan 10, 2026
7b09ab3
feat: implement MobileHeader component for mobile sidebar navigation
rudy128 Jan 10, 2026
3e5441d
feat: add banner dismissal functionality to DocsProvider context
rudy128 Jan 10, 2026
5a646c2
refactor: remove unused menuOpen state from DocsNavbar and adjust z-i…
rudy128 Jan 10, 2026
0f9b2bb
refactor: update DocsLayout component with improved type definitions …
rudy128 Jan 10, 2026
b153aa3
refactor: integrate banner dismissal logic with useDocsMenu for impro…
rudy128 Jan 10, 2026
162ec36
refactor: remove unnecessary destructuring of pageMap in DocsLayout f…
rudy128 Jan 10, 2026
4a277c8
refactor: enhance SidebarFooter with mobile support and dynamic styles
rudy128 Jan 10, 2026
bfcd848
refactor: enhance TOCLink click handling for smooth scrolling and URL…
rudy128 Jan 10, 2026
0cbf48f
refactor: code refactoring according to guidelines
rudy128 Jan 10, 2026
fcc5a0a
Merge branch 'issue/330-b' into issue/330
rudy128 Jan 10, 2026
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
25 changes: 19 additions & 6 deletions mdx-components.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import { useMDXComponents as getThemeComponents } from "nextra-theme-docs"; // nextra-theme-blog or your custom theme
import { DocsLayout } from './src/components/docs/DocsLayout';
import { buildPageMap } from './src/app/docs/page-map';

// Get the default MDX components
const themeComponents = getThemeComponents();

// Merge components
// Custom MDX components without nextra-theme-docs
export function useMDXComponents(components) {
return {
...themeComponents,
// Wrapper component that wraps the entire MDX content with DocsLayout
wrapper: ({ children, toc, metadata, sourceCode, ...props }) => {
const { pageMap } = buildPageMap();

return (
<DocsLayout pageMap={pageMap} toc={toc} metadata={metadata}>
{children}
</DocsLayout>
);
},
// You can add custom component mappings here
// Example:
// h1: (props) => <h1 className="custom-h1" {...props} />,
// h2: (props) => <h2 className="custom-h2" {...props} />,
// a: (props) => <a className="custom-link" {...props} />,
...components,
};
}

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"dependencies": {
"@react-three/drei": "^10.7.6",
"@react-three/fiber": "^9.4.0",
"@theguild/remark-mermaid": "^0.3.0",
"dotenv": "^17.2.3",
"framer-motion": "^12.23.22",
"lucide-react": "^0.545.0",
"mermaid": "^11.12.1",
"next": "^15.5.9",
"next-intl": "^4.3.12",
"nextra": "^4.6.0",
"nextra-theme-docs": "^4.6.0",
"next-themes": "^0.4.6",
"nextra": "^4.6.1",
"postmark": "^4.0.5",
"react": "^19.2.0",
"react-dom": "^19.2.0",
Expand Down
43 changes: 14 additions & 29 deletions src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Layout } from 'nextra-theme-docs'
import 'nextra-theme-docs/style.css'
import { DocsNavbar, DocsFooter, DocsBanner } from '@/components/docs/index'
import { DocsProvider } from '@/components/docs/DocsProvider'
import { Inter, JetBrains_Mono } from "next/font/google"
import { Suspense } from 'react'
import { ThemeProvider } from "next-themes"
Expand All @@ -23,44 +22,30 @@ export const metadata = {
description: 'Official documentation for KubeStellar - Multi-cluster orchestration platform',
}

const banner = <DocsBanner />
const navbar = (
<Suspense fallback={<div style={{ height: '4rem' }} />}>
<DocsNavbar />
</Suspense>
)
const footer = <DocsFooter />

type Props = {
children: React.ReactNode
}

export default async function DocsLayout({ children }: Props) {
// Build page map from local docs
const { pageMap } = buildPageMap()
buildPageMap();

return (
<html lang="en" suppressHydrationWarning>
<body className={`${inter.variable} ${jetbrainsMono.variable} antialiased`}>
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
<Layout
banner={banner}
navbar={navbar}
pageMap={pageMap}
docsRepositoryBase="https://github.com/kubestellar/docs/edit/main/docs/content"
footer={footer}
darkMode={true}
sidebar={{
defaultMenuCollapseLevel: 1,
toggleButton: true
}}
toc={{
float: true,
title: "On This Page"
}}
>
{children}
</Layout>
<DocsProvider>
<div className="flex flex-col min-h-screen">
<DocsBanner />
<Suspense fallback={<div className="h-16" />}>
<DocsNavbar />
</Suspense>
<main className="flex-1">
{children}
</main>
<DocsFooter />
</div>
</DocsProvider>
</ThemeProvider>
</body>
</html>
Expand Down
Loading
Loading