Index of every page on this site: llms.txt
All skills
github avatar

/markdown-to-html

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/markdown-to-html

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesjekyll.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Jekyll Reference

Jekyll is a static site generator that transforms Markdown content into complete websites. It's blog-aware and powers GitHub Pages.

Installation

Prerequisites

  • Ruby 2.7.0 or higher
  • RubyGems
  • GCC and Make

Install Jekyll

# Install Jekyll and Bundler
gem install jekyll bundler

Platform-Specific Installation

# macOS (install Xcode CLI tools first)
xcode-select --install
gem install jekyll bundler

# Ubuntu/Debian
sudo apt-get install ruby-full build-essential zlib1g-dev
gem install jekyll bundler

# Windows (use RubyInstaller)
# Download from https://rubyinstaller.org/
gem install jekyll bundler

Quick Start

Create New Site

# Create new Jekyll site
jekyll new myblog

# Navigate to site
cd myblog

# Build and serve
bundle exec jekyll serve

# Open http://localhost:4000

Directory Structure

myblog/
├── _config.yml      # Site configuration
├── _posts/          # Blog posts
│   └── 2025-01-28-welcome.md
├── _layouts/        # Page templates
├── _includes/       # Reusable components
├── _data/           # Data files (YAML, JSON, CSV)
├── _sass/           # Sass partials
├── assets/          # CSS, JS, images
├── index.md         # Home page
└── Gemfile          # Ruby dependencies

CLI Commands

Command Description
jekyll new <name> Create new site
jekyll build Build to _site/
jekyll serve Build and serve locally
jekyll clean Remove generated files
jekyll doctor Check for issues

Build Options

# Build site
bundle exec jekyll build

# Build with production environment
JEKYLL_ENV=production bundle exec jekyll build

# Build to custom directory
bundle exec jekyll build --destination ./public

# Build with incremental regeneration
bundle exec jekyll build --incremental

Serve Options

# Serve with live reload
bundle exec jekyll serve --livereload

# Include draft posts
bundle exec jekyll serve --drafts

# Specify port
bundle exec jekyll serve --port 8080

# Bind to all interfaces
bundle exec jekyll serve --host 0.0.0.0

Configuration (_config.yml)

# Site settings
title: My Blog
description: A great blog
baseurl: ""
url: "https://example.com"

# Build settings
markdown: kramdown
theme: minima
plugins:
  - jekyll-feed
  - jekyll-seo-tag

# Kramdown settings
kramdown:
  input: GFM
  syntax_highlighter: rouge
  hard_wrap: false

# Collections
collections:
  docs:
    output: true
    permalink: /docs/:name/

# Defaults
defaults:
  - scope:
      path: ""
      type: "posts"
    values:
      layout: "post"

# Exclude from processing
exclude:
  - Gemfile
  - Gemfile.lock
  - node_modules
  - vendor

Front Matter

Every content file needs YAML front matter:

---
layout: post
title: "My First Post"
date: 2025-01-28 12:00:00 -0500
categories: blog tutorial
tags: [jekyll, markdown]
author: John Doe
excerpt: "A brief introduction..."
published: true
---

Your content here...

Markdown Processors

Kramdown (Default)

# _config.yml
markdown: kramdown
kramdown:
  input: GFM                    # GitHub Flavored Markdown
  syntax_highlighter: rouge
  syntax_highlighter_opts:
    block:
      line_numbers: true

CommonMark

# Gemfile
gem 'jekyll-commonmark-ghpages'
# _config.yml
markdown: CommonMarkGhPages
commonmark:
  options: ["SMART", "FOOTNOTES"]
  extensions: ["strikethrough", "autolink", "table"]

Liquid Templating

Variables

{{ page.title }}
{{ site.title }}
{{ content }}
{{ page.date | date: "%B %d, %Y" }}

Loops

{% for post in site.posts %}
  <article>
    <h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
    <p>{{ post.excerpt }}</p>
  </article>
{% endfor %}

Conditionals

{% if page.title %}
  <h1>{{ page.title }}</h1>
{% endif %}

{% unless page.draft %}
  {{ content }}
{% endunless %}

Includes

{% include header.html %}
{% include footer.html param="value" %}

Layouts

Basic Layout (_layouts/default.html)

<!DOCTYPE html>
<html>
<head>
  <title>{{ page.title }} | {{ site.title }}</title>
  <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
</head>
<body>
  {% include header.html %}
  <main>
    {{ content }}
  </main>
  {% include footer.html %}
</body>
</html>

Post Layout (_layouts/post.html)

---
layout: default
---
<article>
  <h1>{{ page.title }}</h1>
  <time>{{ page.date | date: "%B %d, %Y" }}</time>
  {{ content }}
</article>

Plugins

Common Plugins

# Gemfile
group :jekyll_plugins do
  gem 'jekyll-feed'        # RSS feed
  gem 'jekyll-seo-tag'     # SEO meta tags
  gem 'jekyll-sitemap'     # XML sitemap
  gem 'jekyll-paginate'    # Pagination
  gem 'jekyll-archives'    # Archive pages
end

Using Plugins

# _config.yml
plugins:
  - jekyll-feed
  - jekyll-seo-tag
  - jekyll-sitemap

Troubleshooting

Issue Solution
Ruby 3.0+ webrick error bundle add webrick
Permission denied Use --user-install or rbenv
Slow builds Use --incremental
Liquid errors Check for unescaped { }
Encoding issues Add encoding: utf-8 to config
Plugin not loading Add to both Gemfile and _config.yml

Resources

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning12d5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a comprehensive guide for converting Markdown to HTML using industry-standard tools and libraries. It includes appropriate security warnings and detailed remediation steps for handling untrusted input.

  • Socket12d

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    13/16 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 7 months ago
  • markdown
  • html
  • conversion
  • marked
  • pandoc
  • static-site-generator
  • jekyll
  • hugo
  • gfm

README badge

README badge for github/awesome-copilot/markdown-to-html

Converts Markdown files to HTML using marked.js, pandoc, or custom scripts, with support for GFM, CommonMark, and standard Markdown flavors. Handles single files, batch conversions, code blocks, tables, collapsed sections, and mathematical expressions. Suitable for static site generators like Jekyll and Hugo, or building custom markdown-to-HTML conversion tools.

Generated from the current SKILL.md.

Does this skill support GitHub Flavored Markdown?
Yes. The skill supports GFM, CommonMark, and standard Markdown flavors, with GFM enabled via the `gfm: true` option in marked.js or equivalent settings in pandoc.
What tools does this skill cover?
The skill provides guidance for marked.js (Node.js and CLI), pandoc (command-line tool), and custom conversion scripts. It also references jekyll and hugo for templating systems that convert markdown to HTML.
Does marked.js sanitize HTML output?
No. Marked does not sanitize output HTML. The skill recommends using DOMPurify, sanitize-html, or js-xss to sanitize untrusted markdown before display.
Can this skill handle batch conversions and advanced features like tables and math expressions?
Yes. The skill covers single and batch file conversions, tables with alignment, code blocks with language tags, collapsed sections (details/summary), and mathematical expressions with MathML rendering.
Does pandoc require additional software for PDF output?
Yes. Pandoc requires a LaTeX installation (MacTeX on macOS, MiKTeX on Windows, texlive on Linux) to generate PDF output from markdown.

Generated from the current SKILL.md. These answers refresh after source changes.