š MoonMDS
Moon Markdown Display System - A beautiful, modern markdown file viewer built with Next.js, shadcn/ui, and Framer Motion.
⨠Features
- š File Directory - Browse all markdown files in a beautiful grid
- šØ Theme Support - Light, dark, and system themes
- š± Responsive Design - Works on all devices
- š Search & Filter - Find files quickly with search and tag filters
- š Pagination - Navigate large collections easily
- š Native Share - Share using device's native share functionality
- ā¬ ļø Easy Navigation - Back button and breadcrumbs
- š Code Highlighting - Syntax highlighting for 100+ languages
- š Table of Contents - Auto-generated from headings
- ā” Fast - Optimized performance with Next.js
š Getting Started
Prerequisites
- Node.js 18+
- npm or yarn
Installation
hljs bash# Clone the repository
git clone https://github.com/your-username/moonmds.git
cd moonmds
# Install dependencies
npm install
# Start development server
npm run dev
Open http://localhost:3000 to view the app.
Adding Markdown Files
Simply add .md files to the root directory or any subdirectory. They'll automatically appear in the file browser.
Frontmatter Support
Add frontmatter to your markdown files for enhanced metadata:
hljs markdown---
title: My Document Title
description: A brief description of the document
date: 2024-01-10
tags: [tag1, tag2, tag3]
---
# Document Content
Your markdown content here...
š ļø Tech Stack
| Technology | Purpose |
|---|---|
| Next.js 15 | React framework |
| shadcn/ui | UI components |
| Tailwind CSS | Styling |
| Framer Motion | Animations |
| react-markdown | Markdown parsing |
| highlight.js | Syntax highlighting |
š Project Structure
moonmds/
āāā src/
ā āāā app/
ā ā āāā layout.tsx # Root layout
ā ā āāā page.tsx # Home page (file list)
ā ā āāā not-found.tsx # 404 page
ā ā āāā view/[...slug]/ # Document viewer
ā āāā components/
ā ā āāā ui/ # shadcn/ui components
ā ā āāā markdown-renderer.tsx
ā ā āāā file-card.tsx
ā ā āāā share-button.tsx
ā ā āāā ...
ā āāā lib/
ā āāā markdown.ts # Markdown utilities
ā āāā utils.ts # General utilities
āāā docs/ # Sample markdown files
āāā package.json
šØ Customization
Themes
Modify the color scheme in src/app/globals.css:
hljs css:root {
--primary: oklch(0.55 0.25 280); /* Purple */
--accent: oklch(0.65 0.2 340); /* Pink */
/* ... other variables */
}
Components
All UI components are in src/components/ui/ and can be customized as needed.
š License
MIT License - feel free to use this project for personal or commercial purposes.
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Made with š and lots of ā