Skip to content
/ mip.rs Public

Fast and suckless markdown viewer written in Rust.

License

Notifications You must be signed in to change notification settings

mipmip/mip.rs

Repository files navigation

Markdown Instant Preview - Rust edition

Markdown Instant Preview aka mip is a fast and bloatless markdown document viewer. Mip uses a webview window to render the markdown. I wrote mip to preview my markdown files which I write in vim.

After a first attempt of developing Mip in Crystal, Rust seemed a better choice as it has more mature parallism support. This is essential for running webview next to a webserver.

See the simple workflow in this video...

mip-video.webm

Features

  • built-in webserver
  • preview images
  • hides frontmatter
  • autoreload if file changes
  • uft8 & 🤔 support

Installation

The latest Mip binaries for Mac and Windows can be downloaded at the release pages. Currently we have problems building Linux binaries with our workflow. Help with this would be appreciated.

Usage

mip [markdown file]

Todo

  • prj: Readme best practices
  • app: command line options
  • app: improve error handling
  • app: use webview reload and not javascript reload
  • prj: refactor cleanup var names
  • prj: testing
  • prj: release workflow
    • auto build binaries at release
    • version tag script
    • set version and date in changelog
  • app: table of contents
  • app: reload keybinding
  • app: rm temp files
  • app: vim keybindings
  • app: export pdf
  • app: export html
  • blog: mip.cr and mip.rs
  • prog: nix build
  • app: linux desktop info

Development

Prerequisites

  • webkitgtk
  • rust
  • yarn (if you want modify the html template)

Setup HTML Template dev Environment

yarn

Compile and run program

cargo run

Build optimized program

cargo build --release

Compile themes

make compthemes
./mip

Contributing

  1. Fork it (https://github.com/mipmip/mip.rs/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors