Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ee37ebc
build(deps): bump fumadocs-ui from 15.5.1 to 15.5.3
dependabot[bot] Jun 16, 2025
c9a16e5
build(deps): bump fumadocs-core from 15.5.1 to 15.5.3
dependabot[bot] Jun 16, 2025
eeb8fd0
build(deps-dev): bump @tailwindcss/postcss from 4.1.8 to 4.1.10
dependabot[bot] Jun 16, 2025
984134a
build(deps-dev): bump tailwindcss from 4.1.8 to 4.1.10
dependabot[bot] Jun 16, 2025
c40be6a
Merge pull request #143 from deploystackio/dependabot/npm_and_yarn/ta…
JasonKrik Jun 18, 2025
8370a94
Merge pull request #141 from deploystackio/dependabot/npm_and_yarn/fu…
JasonKrik Jun 18, 2025
ab7e576
Merge pull request #139 from deploystackio/dependabot/npm_and_yarn/fu…
JasonKrik Jun 18, 2025
0fa6d73
Merge pull request #142 from deploystackio/dependabot/npm_and_yarn/ta…
JasonKrik Jun 18, 2025
c7fadd0
build(deps-dev): bump postcss from 8.5.4 to 8.5.6
dependabot[bot] Jun 18, 2025
f809ac1
Merge pull request #140 from deploystackio/dependabot/npm_and_yarn/po…
JasonKrik Jun 18, 2025
e548e68
refactor: remove CustomNavbar and update navigation configuration
JasonKrik Jun 18, 2025
32b5ec6
Add comprehensive documentation for multi-service support and parser …
JasonKrik Jun 18, 2025
bc48414
refactor: enhance local file checking for markdown links
JasonKrik Jun 18, 2025
bf83f9e
Merge pull request #144 from deploystackio/feat/domain-hosting
JasonKrik Jun 18, 2025
4c386d6
chore: remove outdated documentation files for project structure, pub…
JasonKrik Jun 18, 2025
9ff372d
Merge pull request #145 from deploystackio/feat/domain-hosting
JasonKrik Jun 18, 2025
9ed07db
docs: add sidebar entries for improved navigation in docker-to-iac do…
Jun 20, 2025
c069547
Add comprehensive documentation for DeployStack features and configur…
Jun 21, 2025
9e0a678
feat: implement HomeLayout for root page and update layout configuration
Jun 21, 2025
ef2958e
feat: update Login link to use custom component with styling
Jun 21, 2025
33cd63b
Add comprehensive documentation for DeployStack development, global s…
Jun 21, 2025
f22ce13
refactor: update layout configuration to use specific options for Hom…
Jun 21, 2025
1ef61be
feat: enhance documentation structure by adding sidebar links and rem…
Jun 21, 2025
b03c29d
fix: update links in documentation for global settings and security d…
Jun 21, 2025
888ede7
Merge pull request #146 from deploystackio/feat/slidemenu
Lasim Jun 21, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,8 @@ coverage/
.jest/

._*.mdx
._*.md
._*.json
._*.ts
._*.tsx
out/
57 changes: 49 additions & 8 deletions app/docs/[[...slug]]/page.tsx → app/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import type { Metadata } from 'next';
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
import { source } from '@/lib/source';
import { generatePageMetadata, getCanonicalUrl } from '@/lib/seo-utils';
import { CustomNavbar } from '@/lib/components/CustomNavbar';
import { getFinalPageTitle } from '@/lib/h1-extractor';
import { readFile } from 'fs/promises';
import { getMDXComponents } from '@/mdx-components';
import { homeOptions, docsOptions } from '../layout.config';
import { docs } from '@/.source/index';

export default async function Page({
params,
Expand All @@ -22,18 +25,56 @@ export default async function Page({

const MDX = page.data.body;

// Determine if this is the root page (no sidebar needed)
const isRootPage = !slug || slug.length === 0;

// Use HomeLayout for root page (no sidebar), DocsLayout for all other pages
if (isRootPage) {
return (
<HomeLayout {...homeOptions}>
<div className="container max-w-6xl mx-auto px-4 py-8">
<article className="prose prose-neutral dark:prose-invert max-w-none">
<MDX components={getMDXComponents()} />
</article>
</div>
</HomeLayout>
);
}

return (
<DocsPage toc={page.data.toc} full={page.data.full}>
<CustomNavbar />
<DocsBody>
<MDX components={getMDXComponents()} />
</DocsBody>
</DocsPage>
<DocsLayout
{...docsOptions}
tree={source.pageTree}
nav={{
title: 'DeployStack Docs',
url: '/',
}}
sidebar={{
defaultOpenLevel: 1
}}
>
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsBody>
<MDX components={getMDXComponents()} />
</DocsBody>
</DocsPage>
</DocsLayout>
);
}

export async function generateStaticParams() {
return source.generateParams();
const params = source.generateParams();

const result = [
...params,
...docs.docs
.filter((page: any) => page._file.flattenedPath)
.map((page: any) => ({
slug: page._file.flattenedPath.split('/'),
})),
];

return result;
}

export async function generateMetadata({
Expand Down
22 changes: 0 additions & 22 deletions app/docs/layout.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions app/docs/sitemap.xml/route.ts

This file was deleted.

45 changes: 40 additions & 5 deletions app/layout.config.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';

export const baseOptions: BaseLayoutProps = {
// Navigation bar configuration (now handled by CustomNavbar)
// Base configuration shared between both layouts
const baseConfig = {
nav: {
title: 'DeployStack Docs',
url: '/docs',
url: '/',
},

// GitHub repository for edit links
githubUrl: 'https://github.com/deploystackio/documentation',
};

// Configuration for the home page (root URL) with all links visible
export const homeOptions: BaseLayoutProps = {
...baseConfig,
links: [
{
text: 'MCP Server',
url: 'https://deploystack.io/mcp',
external: true,
},
{
text: 'Changelog',
url: 'https://deploystack.io/changelog',
external: true,
},
{
type: 'custom',
secondary: true,
children: (
<a
href="https://cloud.deploystack.io/login"
target="_blank"
rel="noopener noreferrer"
className="text-slate-100 bg-slate-800 border border-slate-700 ml-1.5 focus:outline-none hover:bg-slate-900 hover:text-slate-50 focus:ring-4 focus:ring-gray-100 font-medium rounded-full text-sm px-5 py-2 me-2 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700 transition-colors"
>
Login
</a>
),
},
],
};

export const docsOptions: BaseLayoutProps = {
...baseConfig
};

export const baseOptions = docsOptions;
30 changes: 30 additions & 0 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { MetadataRoute } from 'next';
import { source } from '@/lib/source';

export const dynamic = 'force-static';

function getPages(tree: any): any[] {
const pages: any[] = [];

function traverse(nodes: any[]) {
for (const node of nodes) {
if (node.type === 'page') {
pages.push(node);
} else if ('children' in node) {
traverse(node.children);
}
}
}

traverse(tree.children);
return pages;
}

export default function sitemap(): MetadataRoute.Sitemap {
const pages = getPages(source.pageTree).map((page) => ({
url: new URL(page.url, 'https://docs.deploystack.io').toString(),
lastModified: page.lastModified,
}));

return pages;
}
39 changes: 28 additions & 11 deletions check-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,35 @@ const extractLinks = (content) => {

// Check if a local file exists
const checkLocalFile = (linkPath, filePath) => {
if (linkPath.startsWith('/docs/')) {
// Check for internal links (starting with / but not external URLs)
if (linkPath.startsWith('/') && !linkPath.startsWith('//') && !linkPath.startsWith('http')) {
// Remove hash fragment before checking file existence
const [baseUrl] = linkPath.split('#');
const localPath = path.join(process.cwd(), baseUrl);

try {
fs.accessSync(localPath, fs.constants.F_OK);
console.log(` ✅ ${linkPath}`);
return true;
} catch (err) {
console.log(` ❌ ${linkPath} → File not found`);
return false;
// Map the URL to the actual file location
// Since our URLs are now root-level but files are in docs/
const actualFilePath = path.join(process.cwd(), 'docs', baseUrl.substring(1));

// Try both .mdx and .md extensions
const possiblePaths = [
actualFilePath + '.mdx',
actualFilePath + '.md',
path.join(actualFilePath, 'index.mdx'),
path.join(actualFilePath, 'index.md')
];

for (const possiblePath of possiblePaths) {
try {
fs.accessSync(possiblePath, fs.constants.F_OK);
console.log(` ✅ ${linkPath}`);
return true;
} catch (err) {
// Continue to next possible path
}
}

console.log(` ❌ ${linkPath} → File not found (checked: ${possiblePaths.map(p => path.relative(process.cwd(), p)).join(', ')})`);
return false;
}
return null; // not a local file
};
Expand Down Expand Up @@ -79,7 +95,8 @@ const processFile = async (filePath) => {

let allValid = true;
for (const link of links) {
if (link.url.startsWith('/docs/')) {
if (link.url.startsWith('/') && !link.url.startsWith('//') && !link.url.startsWith('http')) {
// Internal link (root-level)
const isValid = checkLocalFile(link.url, filePath);
if (!isValid) allValid = false;
} else if (link.url.startsWith('http')) {
Expand Down Expand Up @@ -109,7 +126,7 @@ const processDirectory = async (dir) => {
if (stat.isDirectory()) {
const isValid = await processDirectory(filePath);
if (!isValid) allValid = false;
} else if (file.endsWith('.md')) {
} else if (file.endsWith('.md') || file.endsWith('.mdx')) {
const isValid = await processFile(filePath);
if (!isValid) allValid = false;
}
Expand Down
Loading
Loading