MoonMDSMarkdown Showcase
README.md

MoonMDS - Markdown Display System

January 10, 2024
3 min read
457 words
readmeprojectdocumentation

šŸŒ™ 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

TechnologyPurpose
Next.js 15React framework
shadcn/uiUI components
Tailwind CSSStyling
Framer MotionAnimations
react-markdownMarkdown parsing
highlight.jsSyntax 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 ā˜•