Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a temp...
Scanned 9/4/2026
Install to Claude Code
npx -y skills add paulasilvatech/awesome-harness-primitives --skill markdown-to-html --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Markdown To Html?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/paulasilvatech-markdown-to-html-341678b8)More formats (shields.io, HTML) on the badges page.
---
name: "markdown-to-html"
description: >-
Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar
tools; or writing custom script to convert markdown to html and/or working on web template systems
like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown
documents, converting them to html. Use when asked to "convert markdown to html", "transform md to
html", "render markdown", "generate html from markdown", or when working with .md files and/or web a
templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with
GFM, CommonMark, and standard Markdown flavors.
---
# Markdown to HTML Conversion
Expert skill for converting Markdown documents to HTML using the marked.js library, or writing data conversion scripts; in this case scripts similar to [markedJS/marked](https://github.com/markedjs/marked) repository. For custom scripts knowledge is not confined to `marked.js`, but data conversion methods are utilized from tools like [pandoc](https://github.com/jgm/pandoc) and [gomarkdown/markdown](https://github.com/gomarkdown/markdown) for data conversion; [jekyll/jekyll](https://github.com/jekyll/jekyll) and [gohugoio/hugo](https://github.com/gohugoio/hugo) for templating systems.
The conversion script or tool should handle single files, batch conversions, and advanced configurations.
## When to invoke
- User asks to "convert markdown to html" or "transform md files"
- User wants to "render markdown" as HTML output
- User needs to generate HTML documentation from .md files
- User is building static sites from Markdown content
- User is building template system that converts markdown to html
- User is working on a tool, widget, or custom template for an existing templating system
- User wants to preview Markdown as rendered HTML
## Converting Markdown to HTML
### Essential Basic Conversions
For more see [basic-markdown-to-html.md](references/basic-markdown-to-html.md)
```text
```markdown
# Level 1
## Level 2
One sentence with a [link](https://example.com), and a HTML snippet like `<p>paragraph tag</p>`.
- `ul` list item 1
- `ul` list item 2
1. `ol` list item 1
2. `ol` list item 1
| Table Item | Description |
| One | One is the spelling of the number `1`. |
| Two | Two is the spelling of the number `2`. |
```js
var one = 1;
var two = 2;
function simpleMath(x, y) {
return x + y;
}
console.log(simpleMath(one, two));
```
```
```html
<h1>Level 1</h1>
<h2>Level 2</h2>
<p>One sentence with a <a href="https://example.com">link</a>, and a HTML snippet like <code><p>paragraph tag</p></code>.</p>
<ul>
<li>`ul` list item 1</li>
<li>`ul` list item 2</li>
</ul>
<ol>
<li>`ol` list item 1</li>
<li>`ol` list item 2</li>
</ol>
<table>
<thead>
<tr>
<th>Table Item</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>One</td>
<td>One is the spelling of the number `1`.</td>
</tr>
<tr>
<td>Two</td>
<td>Two is the spelling of the number `2`.</td>
</tr>
</tbody>
</table>
<pre>
<code>var one = 1;
var two = 2;
function simpleMath(x, y) {
return x + y;
}
console.log(simpleMath(one, two));</code>
</pre>
```
```
### Code Block Conversions
For more see [code-blocks-to-html.md](references/code-blocks-to-html.md)
```text
```markdown
your code here
```
```html
<pre><code class="language-md">
your code here
</code></pre>
```
```js
console.log("Hello world");
```
```html
<pre><code class="language-js">
console.log("Hello world");
</code></pre>
```
```markdown
```
```
visible backticks
```
```
```
```html
<pre><code>
```
visible backticks
```
</code></pre>
```
```
### Collapsed Section Conversions
For more see [collapsed-sections-to-html.md](references/collapsed-sections-to-html.md)
```text
```markdown
<details>
<summary>More info</summary>
### Header inside
- Lists
- **Formatting**
- Code blocks
```js
console.log("Hello");
```
</details>
```
```html
<details>
<summary>More info</summary>
<h3>Header inside</h3>
<ul>
<li>Lists</li>
<li><strong>Formatting</strong></li>
<li>Code blocks</li>
</ul>
<pre>
<code class="language-js">console.log("Hello");</code>
</pre>
</details>
```
```
## Extended reference
Additional detailed guidance was moved to [references/extended-guide.md](references/extended-guide.md) to keep this skill within the progressive-disclosure budget.
## Progressive disclosure and bundled resources
At discovery time, only `name` and `description` are loaded. Read or execute bundled resources only when the current task needs them.
- `references/basic-markdown-to-html.md`, `references/code-blocks-to-html.md`, `references/collapsed-sections-to-html.md`, `references/tables-to-html.md`, and `references/writing-mathematical-expressions-to-html.md`: concrete conversion examples.
- `references/marked.md`, `references/pandoc.md`, `references/gomarkdown.md`, `references/jekyll.md`, `references/hugo.md`, and `references/extended-guide.md`: tool-specific guidance.
## Output template
```markdown
## Markdown to HTML result
**Status:** converted | script provided | blocked
**Input:** `<file, directory, or snippet>`
**Renderer/flavor:** `<marked.js | pandoc | gomarkdown/markdown | GFM | CommonMark | other>`
### Output artifact
```html
<converted HTML or template excerpt>
```
### Notes
- <escaping, sanitization, front matter, or flavor decision>
```
## Quality gate
- [ ] The Markdown flavor and renderer assumptions are stated.
- [ ] Headings, links, lists, tables, code blocks, raw HTML, and collapsed sections are handled when present.
- [ ] Inline and fenced code escape HTML correctly.
- [ ] The output artifact is concrete HTML or a runnable conversion script.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!