A lightweight Markdown preview tool that opens a rendered view of your Markdown file in the browser, with an optional live-updating mode that watches the file and automatically refreshes as you edit.
- Live Preview: Optionally refreshes browser view when you save changes to your Markdown file (with
--watch) - 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 markflownpm install markflowSimply point markflow to any Markdown file:
markflow README.mdThis will:
- Start a local server (default port 3000)
- Open your browser with the rendered Markdown
- Shut down the server and exit once the page has loaded
By default, markflow gives you a one-time snapshot: the browser tab keeps showing what was rendered, but it is no longer connected to the file or the server.
To keep the browser in sync with the file as you edit it, pass the --watch or -w flag:
markflow README.md --watch
# or
markflow README.md -wThis will:
- Start a local server (default port 3000)
- Open your browser with the rendered Markdown
- Watch the file for changes and auto-refresh the browser
- Keep running until you stop it (e.g. with Ctrl+C)
You can specify a custom port using the --port or -p flag:
markflow README.md --port 8080
# or
markflow README.md -p 8080This can be combined with --watch:
markflow README.md --watch --port 8080Display help information:
markflow --help
# or
markflow -hMarkflow uses BrowserSync to create a local development server that:
- Serves a single HTML page with your rendered Markdown content
- Uses Showdown.js to convert Markdown to HTML
- Applies GitHub's markdown CSS for professional styling
By default, the server shuts down shortly after the browser loads the page, so the tab is a static snapshot. When --watch is passed, the server instead stays running, watches the Markdown file for changes, and automatically refreshes the browser when changes are detected.
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 linkYou can also run markflow directly from the repo root, without linking or installing it globally:
node app.js README.mdmarkflow/
├── 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