Crates.io | omd |
lib.rs | omd |
version | 0.2.0 |
source | src |
created_at | 2024-10-18 19:55:35.297024 |
updated_at | 2024-10-26 11:32:05.6247 |
description | A minimalistic and slick looking markdown viewer with support for hot reloading and latex |
homepage | |
repository | https://github.com/ptrglbvc/omd |
max_upload_size | |
id | 1414724 |
size | 648,226 |
omd is a simple, fast, and lightweight Markdown renderer and previewer written in Rust. It allows you to convert Markdown files to HTML and preview them in your browser, either statically or with live-reload support.
style.css
.Clone the Repository
git clone https://github.com/ptrglbvc/omd.git
cd omd
Build the Project
cargo build --release
Install
Optionally, you can install omd
to your local Cargo bin directory:
cargo install --path .
This allows you to run omd
from anywhere on your system.
cargo install omd
That is it.
omd [OPTIONS] [FILE]
-s
, --static-mode
: Run in static mode. Converts the Markdown file to HTML and opens it in your default browser without starting a server.Convert a Markdown file to HTML and open it in your browser:
omd --static-mode README.md
If no file is specified, omd
will read from stdin
:
cat README.md | omd --static-mode
Start a local server to preview your Markdown file with live-reload functionality:
omd README.md
Open http://localhost:3030 in your browser. Whenever you save changes to README.md
, the browser will automatically reload to reflect the updates.
Note that it will crash if the port is taken, like for example if you have another instance of omd openned. To solve this change the port number with the --port
flag. Like so:
omd --port 6969 README.md
This project is licensed under the MIT License.
Contributions are welcome! Please follow these steps:
Please make sure to update tests as appropriate.
For questions or suggestions, feel free to open an issue or reach out via email at petar0golubovic@gmail.com.