- GitHub-flavored Markdown support (GFM)
- Real-time live preview side-by-side with the editor
- Syntax highlighting for code blocks using
highlight.js - GitHub-style Markdown rendering with proper bullets, headings, code blocks, etc.
- Write Markdown in the left panel and instantly see the rendered preview on the right
- Supports tables, strikethrough, task lists, autolinks, and more via
remark-gfm - Syntax-highlighted code blocks with
rehype-highlightand GitHub Dark theme style - Responsive design with Tailwind CSS for a clean, modern UI
- Uses official GitHub Markdown CSS for an authentic GitHub look and feel
- Node.js 16+ installed
- Yarn or npm
git clone https://github.com/yourusername/markdown-viewer.git
cd markdown-viewer
npm install
npm run dev/app
/page.tsx # Next.js page rendering the Editor component
/components
/Editor.tsx # Markdown editor + preview component
/styles
/globals.css # Global styles and GitHub Markdown CSS import
/tailwind.config.ts # Tailwind CSS configuration
/postcss.config.js # PostCSS config with Tailwind plugin
/next.config.ts # Next.js config
/package.json
- Thanks to sindresorhus/github-markdown-css
- Powered by the awesome remark and rehype ecosystems.