| Crates.io | omd |
| lib.rs | omd |
| version | 0.2.2 |
| created_at | 2024-10-18 19:55:35.297024+00 |
| updated_at | 2024-12-25 14:30:42.382895+00 |
| 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 | 652,596 |
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.
$...$ for inline math and $$...$$ for block math.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.-C, --clipboard: Render Markdown content from your clipboard instead of a file. Cannot be used with a file argument.-H, --host <HOST>: Specify the host address for the server (default: 127.0.0.1). Use 0.0.0.0 to make the server accessible on your local network.-P, --port <PORT>: Specify the port for the server (default: 3030). Useful if the default port is already in use.-h, --help: Print help information.-V, --version: Print version information.Render Markdown content from your clipboard:
omd --clipboard
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.
If the default port is already in use, specify a different port:
omd --port 6969 README.md
Make the server accessible on your local network:
omd --host 0.0.0.0 README.md
Convert a Markdown file to HTML and open it in your browser:
omd --static-mode README.md
cat README.md | omd --static-mode
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 me@ptrglbvc.dev.