Transform your plain text documents into beautiful HTML documents with customizable styling and templates.
gem install mint
Transform a Markdown document into styled HTML:
mint publish Document.md
This creates Document.html
in your current directory with beautiful default styling.
# Publish a single document
mint publish Document.md
# Publish with a template
mint publish Document.md --template nord
# Publish to a specific directory
mint publish Document.md --destination public
# Publish multiple files
mint publish *.md --destination final-drafts
# Publish a digital garden, with linked navigation
mint publish content/**/*.md --template garden --destination public
Flag | Description |
---|---|
-t, --template TEMPLATE |
Use a built-in template (combines layout + style) |
-l, --layout LAYOUT |
Specify only the layout |
-s, --style STYLE |
Specify only the style |
-d, --destination DIR |
Output directory |
-o, --output-file FORMAT |
Custom output filename format |
-m, --style-mode MODE |
How styles are included (inline, external, original) |
--style-destination PATH |
Create external stylesheet and link it (sets mode to external) |
-r, --recursive |
Find all Markdown files in any directories specified |
Mint offers three ways to include styles in your HTML output:
inline
(default) – CSS is embedded directly in the HTML document as<style>
tagsexternal
– CSS is compiled and saved as separate files, linked with<link>
tagsoriginal
– Links directly to original CSS template files without processing (for live editing)
The original
mode is particularly useful for template development, as it allows you to edit CSS files and see changes immediately without republishing. Only .css
files are supported in this mode, and @import
statements in CSS files will be included as additional <link>
tags.
default
– Clean, minimal stylingnord
– Clean, uses Nord color schemenord-dark
– Dark version of Nordgarden
– For digital gardens; includes navigation
- Complete usage guide: TUTORIAL.md
- Man page:
man mint
(after installation) - API documentation: RubyDoc
- Focus on writing – Keep documents as plain text
- Version control friendly – Text files work great with Git
- Scriptable – Automate document processing
- Beautiful output – Professional-looking HTML ready for print or web
- Highly customizable – Create your own templates and styles
Mint supports layouts written in HAML or ERB and stylesheets can be written in CSS, SCSS, or SASS.
- Fork the repository
- Create a feature branch
- Make your changes
- Run the tests:
rspec
- Submit a pull request
MIT License. See LICENSE for details.