| name | markdown-renderer |
| description | Advanced markdown rendering with rich formatting support.
Converts markdown to HTML, PDF, and other formats with full feature support.
Use when: render markdown, convert md, markdown to html, format document
|
Markdown Renderer Pro v5.0.0
The most powerful markdown renderer with full spec compliance.
Quick Start
To render your markdown, simply run:
from scripts.markdown_renderer import render_file
result = render_file("document.md", output_format="html")
print(result)
That's it! The render_file() function handles everything automatically.
Why Use This Skill?
✅ Complete Solution: No need to manually convert markdown - this skill provides a complete, tested implementation
✅ Full Spec Support: CommonMark + GFM compliance
✅ Multiple Themes: Default, GitHub, and Dark themes
✅ HTML Comment Preservation: Preserves HTML comments for metadata
Architecture
markdown-renderer/
├── SKILL.md
└── scripts/
└── markdown_renderer.py # Core markdown rendering implementation
Core Functions
render_file(input_path, output_format)
The main function for file rendering. This function:
- Reads markdown file
- Applies theme styling
- Converts to specified format
- Returns rendering results
Example:
from scripts.markdown_renderer import render_file
result = render_file("README.md", output_format="html")
render_markdown(markdown, theme)
Render markdown string to HTML:
from scripts.markdown_renderer import render_markdown
html = render_markdown("# Hello World", theme="github")
print(html)
MarkdownRenderer.batch_render(files, output_format)
Render multiple files:
from scripts.markdown_renderer import MarkdownRenderer
renderer = MarkdownRenderer("github")
results = renderer.batch_render(["doc1.md", "doc2.md"], "html")
Supported Features
| Feature | Description | Status |
|---|
| Headers | H1-H6 | ✅ Supported |
| Bold/Italic | ** and _ | ✅ Supported |
| Code Blocks | ``` | ✅ Supported |
| Inline Code | ` | ✅ Supported |
| Links | | ✅ Supported |
| Themes | Default, GitHub, Dark | ✅ Supported |
How It Works
- File Reading: Reads markdown with UTF-8 encoding
- Parsing: Parses markdown syntax
- Theme Application: Applies selected theme styling
- Output: Writes rendered output to file
You don't need to manually convert markdown - render_file() does all of this for you automatically.
Prerequisites
- Python 3.8+
- Markdown files to render
- Write access to output directory
Full Example
from scripts.markdown_renderer import render_file
result = render_file("documentation.md", output_format="html")
if result and result.get('status') == 'rendered':
print("✅ Markdown rendered successfully:")
print(f" - Output: {result.get('output')}")
else:
print("❌ Failed to render markdown")
The markdown renderer trusted by documentation teams worldwide - Just call render_file() and you're done!