🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

Overview

Marky

Markdown Magician πŸ§™

Features

  • Hot reload previewing πŸ”₯
  • Conversion to HTML / PDF 🏭
  • Themes! ✨
  • Extensions - Math, diagrams, syntax-highlighting 🧩

Note When converting to PDF it will automatically download a suitable headless chrome binary if one is not present on your system. Everything is automated!

Examples

Convert doc.md to doc.html

marky doc.md

Convert to PDF

marky doc.md --pdf

Start a local preview server with hot-reload

marky doc.md --live

Enable extensions

# Or use --all to enable all
marky doc.md --math --diagrams --highlight

Include local images as base64 encoded and compress them (beta)

# possible values: local, remote, all
marky doc.md --include-images "local" --optimize-images
# or short
marky doc.md -zI local

Select and use a different theme with fzf

marky doc.md --theme $(marky --themes | fzf)

Pipe from stdout and open compiled file

cat doc.md | marky --out doc.html --open

See --help for more info

Install

Install using cargo

cargo install marky

Help

Markdown Magician πŸ§™

Usage: marky [OPTIONS] [PATH]

Arguments:
  [PATH]  Read input from file

Options:
      --completion <GENERATOR>
          [possible values: bash, elvish, fish, powershell, zsh]
  -t, --theme <THEME>
          Theme to use
      --string <STRING>
          Read input from string
      --themes
          List available themes
      --where-config
          Print config path
  -o, --out <OUT>
          Output file
      --stdout
          Output to stdout
  -H, --highlight
          Enable syntax highligting with highlight.js
  -M, --math
          Enable math rendering with KaTeX
  -D, --diagrams
          Enable UML diagrams rendering with Mermaid
  -I, --include-images <INCLUDE_IMAGES>
          Include images into file as base64 encoded [possible values: local, remote, all]
  -z, --optimize-images
          Optimize included images to make them smaller
  -A, --all
          Enable all extra renderers
  -w, --watch
          Recompile file on save
  -l, --live
          Live preview in the browser
      --port <PORT>
          Port of the live server [default: 8080]
  -O, --open
          Open output file in the default app
  -p, --pdf
          Saves document as PDF. Will auto-download headless-chrome
  -h, --help
          Print help
  -V, --version
          Print version

Build

git clone https://github.com/metafates/marky.git
cd marky
cargo install --path .

Screenshots

Some examples...

marky README.md --theme sakura # default theme

sakura

marky README.md --theme air

air

marky README.md --theme retro

retro

See marky --themes to show all available themes.

You can also add your own themes, but it's not documented yet... 😴

You might also like...
A Faster(⚑)  formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin
A Faster(⚑) formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin

Lapce Plugin for Rome Lapce-rome is a Lapce plugin for rome, The Rome is faster ⚑ , A formatter, linter, compiler, bundler, and more for JavaScript, T

Markdown to HTML converter written in Rust. Inspired by Katsuki Yuri's Makudaun Tool.
Markdown to HTML converter written in Rust. Inspired by Katsuki Yuri's Makudaun Tool.

Makurust Makurust is a powerful tool written in Rust that allows you to effortlessly convert your Markdown files into static HTML pages. Inspired by T

Latex template handler using Rust
Latex template handler using Rust

Latex template handler using Rust All the templates used by this program are stored in another GitHub repository. Dependencies rust & cargo How to use

A transpiled superset of TeX for writing LaTeX.

LiA A transpiled superset of TeX for writing LaTeX. This is more for my personal use however you're welcome to use it or contribute. These added featu

PlandUML and Drawio diagrams in doc comments as PNG or SVG images.
PlandUML and Drawio diagrams in doc comments as PNG or SVG images.

rsdoc This crate provides a procedural macro that transform PlandUML and Drawio diagrams in doc comments as PNG or SVG images. The diagrams in doc com

WIP. Goals: Treesitter highlighting, snippets, and a smooth intergration with neovim.

typst.nvim WIP. Goals: Tree-sitter highlighting, snippets, and a smooth integration with neovim. For the past week, I've been thinking what I want for

Tooling and library for generation, validation and verification of supply chain metadata documents and frameworks

Spector Spector is both tooling and a library for the generation, validation and verification of supply chain metadata documents and frameworks. Many

Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

A tool to convert old and outdated "characters" into the superior Rustcii-Encoding.

rustcii A tool to convert old and outdated "characters" into the superior Rustcii-Encoding. Speak your mind. Blazingly ( πŸ¦€ ) fast ( πŸš€ ). Github | cr

Owner
Vadim
CS Student. I like making CLI apps πŸ‘Ύ
Vadim
A cat(1) clone with syntax highlighting and Git integration.

A cat(1) clone with syntax highlighting and Git integration. Key Features β€’ How To Use β€’ Installation β€’ Customization β€’ Project goals, alternatives [δΈ­

David Peter 38.9k Jan 8, 2023
A syntax-highlighting pager for git, diff, and grep output

Get Started Install delta and add this to your ~/.gitconfig: [core] pager = delta [interactive] diffFilter = delta --color-only [delta]

Dan Davison 16k Dec 31, 2022
Simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history

eva simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history installation Homebrew $ brew install eva crates.io $ car

Akshay 632 Jan 4, 2023
LaTeX support for Typst, powered by Rust and WASM.

MiTeX LaTeX support for Typst, powered by Rust and WASM. MiTeX processes LaTeX code into an abstract syntax tree (AST). Then it transforms the AST int

null 58 Jan 1, 2024
A tool to format codeblocks inside markdown and org documents.

cbfmt (codeblock format) A tool to format codeblocks inside markdown, org, and restructuredtext documents. It iterates over all codeblocks, and format

Lukas Reineke 126 May 26, 2023
🌴 Syntax highlighting in Rust.

?? HL (WIP) Syntax highlighting written in Rust. The project is designed to generate html syntax highlighting for the given file. This software is ins

ahmadrosid 8 Jun 28, 2022
🌈 A nushell plugin for syntax highlighting.

nu-plugin-highlight A nushell plugin for syntax highlighting. About nu-plugin-highlight is a plugin for Nushell that provides syntax highlighting for

Piepmatz 4 Jun 29, 2023
Make beautiful colored code listings in LaTeX with the power of TreeSitter.

What is this? This is a CLI tool that consumes TreeSitter's output and transforms it into LaTeX code that will produce syntax-colored code listing. If

TomΓ‘Ε‘ Lebeda 11 Sep 4, 2023
Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. A tokei/scc/cloc alternative.

tcount (pronounced "tee-count") Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. Quick Start Simply run tcount

Adam P. Regasz-Rethy 48 Dec 7, 2022
Tools - The Rome Toolchain. A linter, compiler, bundler, and more for JavaScript, TypeScript, HTML, Markdown, and CSS.

Rome is currently being rewritten in Rust. Read more about it in our latest blog post. The documentation below is out of date and available for poster

Rome 22k Jan 3, 2023