Get started with MD Viewer
This guide will help you set up and start using MD Viewer on your local machine.Prerequisites
Before you begin, make sure you have:- Node.js (version 16 or higher)
- npm or yarn package manager
- A terminal or command prompt
Installation
Install dependencies
Install all required packages using npm:This will install the following key dependencies:
reactandreact-dom- Core React librariesreact-markdownandremark-gfm- Markdown renderingmermaid- Diagram supportlucide-react- Icon libraryvite- Build tool and dev server
Start the development server
Launch the application in development mode:Vite will start the development server and display a local URL (typically
http://localhost:5173).Opening your first markdown file
Once MD Viewer is running, you have three ways to open markdown files:Method 1: Drag and drop
Simply drag any.md or .markdown file from your file explorer and drop it anywhere in the MD Viewer window. The file will be loaded instantly.
Method 2: Upload button
Click the upload icon (↑) in the sidebar header to open a file picker dialog. You can select one or multiple markdown files at once.Method 3: Create a new file
Click the plus icon (+) in the sidebar to create a new untitled markdown file with starter content:MD Viewer accepts
.md, .markdown, and .txt files. Multiple files can be uploaded simultaneously.Managing files
Switching between files
Click any file name in the sidebar to switch to that file. The active file is highlighted with a blue background.Removing files
Hover over a file in the sidebar and click the X button to remove it from your session.Persistence
Your files are automatically saved to browser localStorage and will be restored when you reopen MD Viewer.Adjusting font size
Use the typography controls in the toolbar:- Click the smaller T button to decrease font size (minimum 50%)
- Click the larger T button to increase font size (maximum 200%)
- The current scale percentage is displayed between the buttons
Testing Mermaid diagrams
Create or open a markdown file with a Mermaid code block to see diagram rendering in action:Building for production
When you’re ready to build MD Viewer for production:dist directory. You can preview the production build with:
Next steps
Explore features
Learn about all the powerful features MD Viewer offers
Components
Explore the React components that power MD Viewer