4 releases (breaking)
0.4.0 | Apr 7, 2024 |
---|---|
0.3.0 | Mar 15, 2024 |
0.2.0 | Mar 11, 2024 |
0.1.0 | Mar 10, 2024 |
#354 in Text processing
270 downloads per month
15KB
209 lines
mdopen
Quickly preview local markdown files in browser with GitHub-like look.
Doesn't use GitHub API, but just compiles markdown to HTML in Rust.
Installation
Install from crates.io:
cargo install mdopen
or directly from this repo:
cargo install --git https://github.com/immanelg/mdopen.git
Usage
Start the server and open files in Firefox:
mdopen README.md TODO.md -b firefox
This will open files on addresses http://localhost:5032/README.md
and http://localhost:5032/TODO.md
.
You access any markdown files relative to the current working directory.
You can also browse current directory if you access /
or other directory path.
Features
- Compile GitHub-flavoured markdown to HTML
- Steal GitHub CSS, automatic dark/light mode
- Open files in the default browser automatically
- Directory listing / serve any files in the filesystem
- Syntax Highlighting (via highlight.js)
- Render LaTeX (via KaTeX)
- Output to standalone HTML files
- Live reloading via WS/SSE (tiny_http -> hyper)
Feedback and pull requests are welcome.
Acknowledgements
grip is similar.
Dependencies
~3.5MB
~73K SLoC