A lightweight, real-time Markdown preview tool that watches your Markdown files and automatically updates the rendered HTML in your browser as you edit.
- Live Preview: Automatically refreshes browser view when you save changes to your Markdown file
- GitHub Flavored Markdown: Supports tables, strikethrough text, and other GFM features
- Dark Theme: Uses GitHub's dark markdown CSS for comfortable viewing
- Zero Configuration: Works out of the box with sensible defaults
- Lightweight: Minimal dependencies, fast startup
- Cross-Platform: Works on Windows, macOS, and Linux
npm install -g markflow
npm install markflow
Simply point markflow to any Markdown file:
markflow README.md
This will:
- Start a local server (default port 3000)
- Open your browser with the rendered Markdown
- Watch for changes and auto-refresh the browser
You can specify a custom port using the --port
or -p
flag:
markflow README.md --port 8080
# or
markflow README.md -p 8080
Display help information:
markflow --help
# or
markflow -h
Markflow uses BrowserSync to create a local development server that:
- Serves a single HTML page with your rendered Markdown content
- Watches the specified Markdown file for changes
- Automatically refreshes the browser when changes are detected
- Uses Showdown.js to convert Markdown to HTML
- Applies GitHub's markdown CSS for professional styling
Markflow supports standard Markdown plus these enhanced features:
- Tables: Create tables using pipes and hyphens
- Strikethrough: Use
~~text~~
forstrikethrough - Task Lists: Create checkboxes with
- [ ]
and- [x]
- Code Highlighting: Fenced code blocks with language specification
- Proper List Indentation: Supports 2-space indented sublists
- Node.js 14.0 or higher
- npm or yarn
- Clone the repository:
git clone https://github.com/silijon/markflow.git
cd markflow
- Install dependencies:
npm install
- Link for local development:
npm link
markflow/
├── app.js # Main application entry point
├── markflow/ # Static assets directory
│ └── index.html # HTML template for rendering
├── package.json # Project configuration
└── README.md # This file
Markflow exposes a simple HTTP endpoint when running:
GET /markdown
- Returns JSON with the current markdown file content:{ "location": "/absolute/path/to/file.md", "text": "# Markdown content..." }
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
If you find a bug, please report it at GitHub Issues.
ISC License - see the LICENSE file for details.
John Dennis
- Latest stable release
- Added support for strikethrough and tables
- Fixed 2-space sublist indentation issue
- Initial release
- Basic markdown preview functionality