Generate single-file static responsive HTML page from Markdown with syntax-highlighting.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
img
templates
.drone.yml
.gitignore
Gopkg.lock
Gopkg.toml
LICENSE
README.md
go.mod
go.sum
main.go

README.md

Chromarkdown

forthebadgeforthebadge

Go Version Go Report Card Build Status codecov License Godoc Say Thanks! FOSSA Status

Build single-file static HTML page with Chroma (syntax highlighting) and Markdown

screenshot

Introduction

Chromarkdown is a tool to generate single-file static HTML pages from a Markdown file input. This tool has no external dependecies and performs the following operations:

  • Syntax highlighting thanks to chroma
  • Markdown rendering using blackfriday
  • Embedded Roboto and Roboto-mono fonts
  • Dynamic CSS for Syntax Highlighter according to the chosen theme
  • Single-file (one HTML file) output with embedded styles and fonts (no network call)
  • Responsive page with simple design according to bettermotherfuckingwebsite

Build

Chromarkdown is using dep for its dependency management

$ go get github.com/Depado/chromarkdown
$ cd $GOPATH/Depado/chromarkdown
$ dep ensure
$ packr build

For a standalone installation, chromarkdown is using packr to embed the template in the go binary.

$ go get -u github.com/gobuffalo/packr/...
$ packr build
$ # or, to embed and install: 
$ packr install

Install

Pre-compiled binaries can be found in the releases tab.

$ wget https://github.com/Depado/chromarkdown/releases/download/v1.0.0/chromarkdown_linux_amd64

Usage

Once installed you can run the chromarkdown command:

$ chromarkdown --help

Chromarkdown uses a combination of blackfriday and chroma to render an input markdown file.
It generates standalone HTML files that includes fonts, a grid system and extra CSS.

Usage:
  chromarkdown [input file] [flags]

Flags:
  -h, --help            help for chromarkdown
      --no-toc          Disable the table of content
  -o, --output string   specify the path of the output HTML (default "out.html")
      --theme string    Specify the theme for syntax highlighting (default "monokai")
  -t, --title string    Specify the title of the HTML page (default "Ouput")

License

FOSSA Status