- Home
- Skills
- Github
- Awesome Copilot
- Markdown To Html
markdown-to-html_skill
- JavaScript
- Official
21.9k
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill github/awesome-copilot --skill markdown-to-html- SKILL.md24.1 KB
Overview
This skill converts Markdown files to HTML for CLI and Node.js workflows, supporting CommonMark, GFM, and other common flavors. It covers quick conversions, batch processing, templating system integration, and security guidance for untrusted input. Use it to render Markdown for documentation, static sites, or custom toolchains.
How this skill works
The skill uses proven conversion approaches: libraries like marked, pandoc, and gomarkdown for programmatic and CLI transformations, plus examples for custom scripts and template engines (Jekyll, Hugo). It includes options for parser/renderer configuration, code block handling, tables, math rendering, and sanitization steps to prevent XSS when rendering untrusted content. Examples show single-file, batch, and streaming workflows.
When to use it
- Convert a single .md file to standalone HTML
- Batch-convert a folder of Markdown files for a static site
- Integrate Markdown rendering into a Node.js or Go template pipeline
- Generate documentation or previews from Markdown source
- Render math, tables, code blocks, or collapsed sections into HTML
Best practices
- Enable GFM and relevant extensions (tables, fenced code) for GitHub-style docs
- Sanitize output HTML (DOMPurify or sanitize-html) before browser rendering for untrusted input
- Use a config file or CLI flags for repeatable builds (e.g., ~/.marked.json or pandoc flags)
- Add a syntax highlighter (highlight.js/prism) for readable code blocks
- Prefer pandoc for complex format conversions and templates; use marked/gomarkdown for lightweight programmatic use
Example use cases
- Node.js script: convert README.md to README.html with marked and DOMPurify
- Static site build: batch-convert blog/*.md into template-driven HTML pages for Hugo or Jekyll
- CLI conversion: run pandoc input.md -s -o output.html to produce a standalone page with metadata
- Go utility: use gomarkdown to render Markdown inside a microservice that responds with HTML
- Math-heavy docs: convert TeX delimiters to MathML or MathJax blocks when exporting HTML
FAQ
Sanitize the generated HTML with a library like DOMPurify or sanitize-html, or run pandoc in --sandbox for untrusted input.
Which tool should I pick for static site builds?
Use Hugo or Jekyll when you need a full static site generator; use marked or gomarkdown when you need lightweight programmatic rendering; choose pandoc for complex format conversions or templates.