https://github.com/tomw1808/mkdocs-shadcn
MkDocs in NextJs
https://github.com/tomw1808/mkdocs-shadcn
Last synced: 7 months ago
JSON representation
MkDocs in NextJs
- Host: GitHub
- URL: https://github.com/tomw1808/mkdocs-shadcn
- Owner: tomw1808
- License: other
- Created: 2025-01-27T08:38:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-21T06:24:51.000Z (11 months ago)
- Last Synced: 2025-04-21T07:39:37.314Z (11 months ago)
- Language: TypeScript
- Homepage: https://www.mkdocs-shadcn.org/
- Size: 5.72 MB
- Stars: 23
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-shadcnui - Github - shadcn.org/) | β 26 | (Boilerplates & Starters)
README
# Next.js MkDocs Material Alternative
This project is a drop-in replacement for MkDocs Material, built with Next.js 14+, Tailwind CSS, and shadcn/ui. It aims to provide a modern, fast, and customizable documentation site generator that maintains compatibility with existing MkDocs projects while adding modern features and improvements.
## Features
### Core Features
- π± Fully responsive design with mobile-first approach
- π Dark mode support with system preference detection
- β‘ Fast page loads with Next.js 14+ and App Router
- π¨ Customizable with Tailwind CSS
- π Beautiful UI components from shadcn/ui
- π Full-text search with Pagefind integration
- π GitHub Flavored Markdown support with tables
### Navigation
- π Dynamic sidebar navigation with collapsible sections
- πΊοΈ Automatic navigation structure from mkdocs.yml
- π Previous/Next page navigation
- π± Mobile-friendly navigation drawer with keyboard shortcuts (βK / Ctrl+K)
- π·οΈ Section headers and improved navigation highlighting
- π Version switching support (in development)
### Image Handling
- πΌοΈ Advanced image optimization with Next.js Image component
- πΈ Lightbox gallery support using double exclamation syntax (!![])
- π― Automatic image processing and path handling
- π Support for both local and remote images
- π Automatic public directory management for assets
### Code Features
- π¨ Syntax highlighting with rehype-pretty-code
- π Line highlighting and automatic line numbers
- π Copy-to-clipboard button on all code blocks
- π Code block titles and language detection
- π― GitHub-themed light and dark syntax themes
### Documentation Features
- β οΈ Admonitions with 12+ types (note, warning, danger, etc.)
- π Collapsible admonition blocks using ???
- π² Custom titles for admonition blocks
- π Rich markdown support
- π― Drop-In compatible with existing MkDocs content
## Project Structure
```
your-project/
βββ mkdocs/ # Your documentation root
β βββ mkdocs.yml # MkDocs configuration file
β βββ docs/ # Documentation markdown files
β βββ **/*.md # Markdown files in any subdirectory
βββ components/ # React components
βββ lib/ # Utility functions
βββ public/ # Public assets
```
## Getting Started
1. Install dependencies:
```bash
npm install
# or
yarn install
# or
pnpm install
```
2. Place your `mkdocs.yml` file in the `mkdocs` directory.
3. Place your markdown files in the `mkdocs` directory, maintaining your desired structure.
4. Run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
5. Open [http://localhost:3000](http://localhost:3000) to see your documentation site.
## MkDocs Compatibility
This project maintains full compatibility with MkDocs Material features while providing modern enhancements:
### Fully Compatible Features
- β
Basic markdown rendering with enhanced styling
- β
Navigation structure from mkdocs.yml
- β
Advanced image handling and optimization
- β
Previous/Next navigation
- β
Dark mode with system preference
- β
Admonitions with all standard types
- β
Code blocks with syntax highlighting
- β
Content tabs
- β
Collapsible navigation sections
- β
Tables with column alignment support
### Enhanced Features
- β¨ Improved image galleries with lightbox
- β¨ Better code block interaction
- β¨ Modern UI components
- β¨ Faster page loads
- β¨ Better mobile experience
- β¨ TypeScript support
- β¨ Modern development experience
### Coming Soon
- π Table of contents
- π More MkDocs Material extensions
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Check our contribution guidelines for more information.
## License
This project is available under a custom license that allows free use for both personal and commercial purposes, but explicitly prohibits using the software to create commercial hosting services based on this project. See the [LICENSE](LICENSE.md) file for details.