Documentation site for AppLib built with Next.js and MDX.
- GitHub Integration: Automatically fetches docs from
cihantas/applibGitHub repository - Local Fallback: Falls back to local files if GitHub is unavailable
- Dynamic Routing: Handles nested documentation structure
- Search: Integrated Pagefind search functionality
- Nested Navigation: Collapsible sidebar with nested doc structure
# Copy docs from local applib directory (optional, GitHub is primary source)
npm run copy-docs
# Start development server
npm run dev
# Or copy docs and start in one command
npm run dev:with-docsOpen http://localhost:3000/docs to view the documentation.
# Copy docs and build
npm run build:with-docs
# Or build without copying (will use GitHub)
npm run build- Content Source: The docs system fetches content from GitHub (
cihantas/applibrepo) first - Fallback: If GitHub is unavailable, it falls back to local files in
content/docs/ - Navigation: The sidebar navigation is built from local files (run
npm run copy-docsto update) - Caching: GitHub content is cached for 1 hour to improve performance
You can override the GitHub repository and branch using environment variables:
GITHUB_REPO=cihantas/applib
GITHUB_BRANCH=mainnpm run copy-docs- Copy markdown files from../applib/docstocontent/docsnpm run dev- Start development servernpm run dev:with-docs- Copy docs and start dev servernpm run build- Build for productionnpm run build:with-docs- Copy docs and build