Skip to content

mipmip/mip.rs

Repository files navigation

Coverage: 51%

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

mip-video.webm

Features

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

Platform Notice

v0.2.3 is the last version with macOS and Windows support. Future versions will be Linux-only, using GTK4 and WebKitGTK 6.0. If you need macOS or Windows support, pin to v0.2.3.

Installation

On NixOS / with Nix flakes:

nix run github:mipmip/mip.rs -- ./README.md

Binaries for macOS and Windows (v0.2.3 and earlier) can be downloaded from the release pages.

Usage

mip [markdown file]

Development with Nix

nix develop
make

## Development

### Prerequisites

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

### Setup HTML Template dev Environment

```bash
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

About

Fast and suckless markdown viewer written in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Contributors