A modern, customizable directory/blog template built with Next.js 15, MDX, and shadcn/ui. Perfect for creating content-driven websites, directories, portfolios, blogs, or educational content collections.
|
Built on Next.js 15 with React 19, TypeScript, and the latest web technologies for blazing-fast performance Write content in Markdown with full JSX support - embed interactive components directly in your content Gorgeous UI built with shadcn/ui and Tailwind CSS - customizable, accessible, and production-ready |
Static site generation ensures optimal performance with instant page loads and perfect Lighthouse scores Built-in content search, tag filtering, and smart categorization help users find what they need Automatic dark mode with system preference detection and manual toggle - no extra configuration needed |
- π± Mobile-First & Responsive - Looks stunning on every device from phone to desktop
- πΊοΈ SEO Powerhouse - Auto-generated sitemap, RSS feed, and JSON-LD structured data out of the box
- πΌοΈ Smart Image Handling - Automatic image optimization powered by Next.js
- π΅ Multimedia Ready - Optional audio player for podcasts, tutorials, and educational content
- π·οΈ Flexible Tag System - Organize content with tags and categories for easy navigation
- π§ Config-Driven Setup - Customize everything through simple configuration files
- π Multi-Content Support - Handle different content types (articles, guides, etc.) with ease
- π One-Click Deploy - Deploy to Vercel in seconds with zero configuration
- Framework: Next.js 15 with React 19
- Package Manager: pnpm 9.x
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Content: MDX
- Theming: next-themes
- Typography: next/font/google (Cormorant Garamond & Nunito)
# Clone the repository
git clone https://github.com/rohanpatriot/nextjs-directory-boilerplate
cd nextjs-directory-boilerplate
# Install dependencies
pnpm install
# Start development server
pnpm devOpen http://localhost:3000 to see your site.
βββ content/ # MDX content files
β βββ articles/ # Blog articles
β βββ guides/ # How-to guides and tutorials
β βββ [custom]/ # Add your own content types
βββ src/
β βββ app/ # Next.js App Router
β β βββ [contentType]/ # Dynamic content routes
β β β βββ [slug]/ # Content detail pages
β β βββ tags/ # Tag pages
β β β βββ [tag]/ # Tag-filtered content
β β βββ feed.xml/ # RSS feed
β β βββ sitemap.ts # Dynamic sitemap
β β βββ robots.ts # Robots.txt
β βββ components/ # React components
β β βββ layout/ # Layout components
β β β βββ ContentCard.tsx
β β β βββ ContentGrid.tsx
β β βββ Search/ # Search components
β β βββ ui/ # shadcn/ui components
β βββ config/ # Configuration
β β βββ content.config.ts # Content type definitions
β β βββ directory.config.ts # Site settings
β βββ lib/
β β βββ content/ # Content system
β β β βββ loader.ts # Content loader
β β β βββ types.ts # TypeScript types
β β β βββ index.ts # Exports
β β βββ metadata.ts # SEO metadata
β β βββ structured-data.tsx # JSON-LD schemas
β β βββ utils.ts # Utility functions
β βββ types/ # TypeScript type definitions
β βββ content.ts # Content interfaces
Add MDX files to content/articles/ or content/guides/:
---
title: 'My Post Title'
summary: 'Brief description'
date: '2024-01-15'
author: 'Your Name'
tags: ['tag1', 'tag2']
image: '/images/post-image.jpg'
---
Your content here...See Content System docs for all frontmatter fields and adding custom content types.
Site settings in src/config/directory.config.ts:
export const directoryConfig = {
name: 'Your Site Name',
description: 'Your site description',
// ...
}Content types in src/config/content.config.ts:
export const contentConfig = {
types: {
articles: { /* config */ },
guides: { /* config */ },
// Add your own types
}
}See Configuration docs for full reference.
Comprehensive documentation is available online and in the repository:
- π View Documentation - Online docs via GitHub Pages
- π docs/ - Local documentation folder
- Getting Started - Installation and first steps
- Content System - Adding and managing content
- Configuration - Site and content config reference
- SEO - Sitemap, RSS, metadata, and structured data
- Dark Mode - Theming and customization
- Components - Available UI components
- Deployment - Deploying to Vercel and other platforms
Contributions are welcome! Please feel free to submit a Pull Request.
This project is released under the MIT License.