Home

Awesome

mdv - Markdown Viewer

MDV is a "pure" markdown viewer in the sense that 1) it is just a viewer (not an editor); 2) it is a standalone tool, not a browser plugin. Comparing to other viewers (or editors), MDV provides a pleasant viewing experience and at the same time is customizable and versatile.

USAGE

Installation

  1. Assuming you are using Linux or Mac, clone this repo and run make in the working directory. Windows users may download binary releases from GitHub directly.
  2. Cross-compiling is done by running make windows, make linux or make mac respectively.
  3. Copy mdv (or mdv.exe) to a directory listed in system PATH, and associate it with .md file.

Command Line

Markdown Viewer

USAGE: mdv [OPTIONS] <markdown-file>

OPTIONS:

  -port int
    	HTTP port (auto if not specified)
  -serve
    	serve only (do not open in browser)
  -version
    	show version info

Customize

MDV will generate its configuration under <USER-CONFIG>/mdv folder. USER-CONFIG is ~/.config on Linux, %APPDATA% on Windows and ~/Library/Application Support on Mac. The config.json file in that folder contains the following options:

{
    "main_css": "default.css",
    "code_css": "highlight.css",
    "port":     0,
    "recurse":  2,
    "rev":      39
}

Options are:

Usually, there is no need to edit this config file, except that you may want to use a new stylesheet. Alternatively, you can also edit the default.css file directly to tweak display effects. Also, there is a highlight.css which is the stylesheet for syntax highlighting.

Hint: when the version of MDV upgrades, configuration will be reset. If you use custom styles it is recommended that you use a new stylesheet and change config.json to point to your own style (rather than modify default.css directly).

Other Usages

Apart from a simple viewer, MDV can also work as a "markdown preview engine", with the following options:

Markdown Features

Building Blocks

This tool utilizes the following excellent open source software: