Skip to content
/ gfm2html Public

A bash script. Converts GitHub Flavored Markdown (gfm) to HTML using the Github API

Notifications You must be signed in to change notification settings

fdxx/gfm2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About

A bash script. Converts GitHub Flavored Markdown (gfm) to HTML using the Github API

Usage

Usage: ./gfm2html.sh [OPTIONS] <input>"
OPTIONS:
--mode    Rendering mode. gfm or markdown. default: gfm
--auth    Github auth access token. default: None
          Unauthenticated requests are rate limited to 60 requests per hour.
--css     Link to a CSS style sheet. default: from cdnjs

Quick Start

bash <(curl -fsSL https://raw.githubusercontent.com/fdxx/gfm2html/main/gfm2html.sh) input.md > output.html

Support standard input

echo "**Hi**" | ./gfm2html.sh - > output.html

Custom CSS files

Default usage: github-markdown-css

./gfm2html.sh --css "/path/to/github-markdown.css" input.md > output.html

YAML metadata

Supports the following YAML metadata output to HTML. Add at the beginning of input.md

---
title: 'Hello World!'
author: fdxx
keywords: 'keywords1, keywords2'
description: 'This is a description.'
---

Dependencies

# Try installing dependencies from debian.
apt update && apt install ripgrep
wget https://github.com/jqlang/jq/releases/latest/download/jq-linux-amd64 -O /usr/bin/jq && chmod +x /usr/bin/jq
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq

About

A bash script. Converts GitHub Flavored Markdown (gfm) to HTML using the Github API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages