diff --git a/scripts/sync-doc-content.sh b/scripts/sync-doc-content.sh index 5521948..5fad5a6 100755 --- a/scripts/sync-doc-content.sh +++ b/scripts/sync-doc-content.sh @@ -96,8 +96,6 @@ cat > "${DOCS_DIR}/index.md" << 'EOF' --- title: Cloud-Neutral Toolkit Documentation description: Comprehensive documentation for all Cloud-Neutral Toolkit services -collection: index -collectionLabel: Documentation Home --- # Cloud-Neutral Toolkit Documentation diff --git a/src/app/docs/page.tsx b/src/app/docs/page.tsx index d3017a6..96b1064 100644 --- a/src/app/docs/page.tsx +++ b/src/app/docs/page.tsx @@ -1,10 +1,34 @@ -import { redirect, notFound } from 'next/navigation' -import { getDocCollections } from './resources.server' +import { notFound } from 'next/navigation' +import { promises as fs } from 'fs' +import path from 'path' +import matter from 'gray-matter' +import { MDXRemote } from 'next-mdx-remote/rsc' export default async function DocsHome() { - const collections = await getDocCollections() + try { + // Read the index.md file + const indexPath = path.join(process.cwd(), 'src', 'content', 'doc', 'index.md') + const fileContent = await fs.readFile(indexPath, 'utf-8') + const { data: frontmatter, content } = matter(fileContent) - if (collections.length === 0) { + return ( +
{frontmatter.description}
+ )} +