https://github.com/thunderpoot/macchiato
Yet another Markdown renderer but this one extends standard Markdown with additional features, offering enhanced functionality and flexibility for content creators
https://github.com/thunderpoot/macchiato
markdown markdown-converter markdown-parser markdown-to-html
Last synced: about 2 months ago
JSON representation
Yet another Markdown renderer but this one extends standard Markdown with additional features, offering enhanced functionality and flexibility for content creators
- Host: GitHub
- URL: https://github.com/thunderpoot/macchiato
- Owner: thunderpoot
- License: mit
- Created: 2024-12-11T21:40:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-11T21:48:51.000Z (over 1 year ago)
- Last Synced: 2025-03-12T21:45:27.766Z (over 1 year ago)
- Topics: markdown, markdown-converter, markdown-parser, markdown-to-html
- Language: Go
- Homepage:
- Size: 151 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Macchiato


**Macchiato** is a feature-packed Markdown-to-HTML converter written in Go designed to make your documents shine. Create blog posts, documentation, or just explore the magic of Markdown. Macchiato transforms your text into elegant, web-ready HTML.
Nearly everyone has written a Markdown converter at some point. This project started as a tool for a very specific purpose, but it turned out surprisingly well, so I decided to share it here.
## 🚀 Features
- **Intuitive Markdown Parsing**: Supports the stuff you'd imagine it supports, like headings, bold text, italics, links, images, code blocks, but also some other stuff.
- **Customisable CSS Styling**: Specify your CSS styles with the `--style` option or let Macchiato use its default style.
- **Footnotes and Highlights**: Easily add footnotes and highlighted text to your documents.
- **Dynamic Lists and Tables**: Supports ordered and unordered lists, as well as Markdown tables, obviously.
- **Code Syntax Highlighting**: Formatted code blocks with a copy button, (powered by [Prism](https://prismjs.com/)†.)
- **Extensible HTML Template**: Use the `main.html` template to customise the look of your output.
_†Feel free to use some other highlighter, just edit the `main.html` template file._
## Basic Usage
```bash
go run macchiato.go [output_file]
```
- ``: Path to your Markdown file.
- `[output_file]`: (Optional) Path to save the resulting HTML. If not specified, the HTML is printed to stdout.
### With Custom Styles
```
go run macchiato.go --style= [output_file]
```
## Markdown Features Supported
- Headings: `#`, `##`, `###`, etc.
- Text Formatting: Bold (`**text**`), Italics (`*text*`), Strikethrough (`~~text~~`).
- Links and Images: `[Link](url)` and ``.
- Lists: Ordered (`1. Item`) and Unordered (`- Item`).
- Code Blocks: Indented or fenced with \`\`\`.
- Tables: Markdown table syntax with headers and rows.
- Footnotes: `[Text][^1]` with `[^1]`: Footnote text.
- Custom Containers: `:::` note for callout boxes.
## License
This project is licensed under the MIT License. Use it freely, modify it, and share it with others.
## Contributors
Contributions and feedback are always welcome.
## References
- [Markdown on Wikipedia](https://en.wikipedia.org/wiki/Markdown)
- [RFC 7764](https://datatracker.ietf.org/doc/html/rfc7764.html)
- [RFC 7763](https://datatracker.ietf.org/doc/html/rfc7763.html)