A bash script. Converts GitHub Flavored Markdown (gfm) to HTML using the Github API
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
bash <(curl -fsSL https://raw.githubusercontent.com/fdxx/gfm2html/main/gfm2html.sh) input.md > output.html
echo "**Hi**" | ./gfm2html.sh - > output.html
Default usage: github-markdown-css
./gfm2html.sh --css "/path/to/github-markdown.css" input.md > output.html
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.'
---
# 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