convert-md-to-htmx

Convert Markdown documents into single-file branded HTML with frontmatter and inline CSS.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/GQAdonis/artifact-refiner-skill --skill convert-md-to-htmx-gqadonis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convert-md-to-htmx
Source: https://github.com/GQAdonis/artifact-refiner-skill/tree/main/skills/convert-md-to-htmx
Command: npx skills add https://github.com/GQAdonis/artifact-refiner-skill --skill convert-md-to-htmx-gqadonis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markdown-it, markdown-it-anchor, gray-matter, and includes scripts (resource) and assets (resource) components.

What problem does it solve? Manually converting Markdown content into styled, self-contained HTML pages requires wiring together parsers, frontmatter handling, and CSS injection by hand. This Skill automates that pipeline so a Markdown file plus a brand definition produces one portable HTML document with no external dependencies. ## Core Features & Use Cases - Deterministic Markdown Rendering: Parses Markdown via markdown-it with GFM tables, task lists, strikethrough, auto-linked URLs, heading anchors, and smart typography. - Frontmatter Support: Extracts YAML/TOML frontmatter with gray-matter so title and document-type metadata override CLI flags. - Brand CSS Injection: Renders brand tokens into an inline <style> block via the template-forge vite-shell-css template, producing a single self-contained file. - Use Case: A technical writer has a product brief in Markdown and a registered brand TOML. Running the conversion produces a branded, semantic HTML article ready to share or archive without any external CSS or JS. ## Quick Start Convert my Markdown file docs/brief.md into a branded HTML page using the acme brand and save it as output/brief.html.

Frequently Asked Questions about convert-md-to-htmx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Markdown to a single HTML file with styling?

Run the conversion script with --source pointing to your Markdown file, --brand naming a registered brand TOML, and --output for the target path. The pipeline renders Markdown via markdown-it and injects brand CSS inline, producing one self-contained HTML file.

Does markdown-it support GFM tables and task lists?

Yes, the pipeline configures markdown-it for GFM tables, task lists, and strikethrough, plus auto-linked bare URLs and smart typography. Heading anchors are added for h1 through h4 elements with a header-anchor class.

Can frontmatter override command-line options in Markdown conversion?

Yes, YAML or TOML frontmatter is extracted with gray-matter, and keys like title and document-type take precedence over CLI flags. This lets authors control output structure directly from the Markdown source.

Is embedded HTML in Markdown rendered or escaped?

Embedded HTML in the source Markdown is escaped because markdown-it runs with html: false. This sanitizes the output so only Markdown-generated markup appears in the final document.

Does the HTML output include syntax highlighting for code blocks?

No, code blocks keep a language class like language-js but receive no highlighting. Post-build tooling such as Prism or Shiki can be applied separately if highlighting is needed.