Skip to content
Browse files

Updating documentation

  • Loading branch information...
Depado committed May 21, 2018
1 parent 13ee328 commit 19748a086abf215a52d6a3e53d457ab8c57f8fa0
Showing with 36 additions and 3 deletions.
  1. +34 −2
  2. +2 −1 main.go
@@ -1,9 +1,41 @@
# chromarkdown
# Chromarkdown

![Go Version](
[![Go Report Card](](
[![Build Status](](
[![Say Thanks!](!-1EAEDB.svg)](
[![Say Thanks!](!-1EAEDB.svg)](

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

## 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
- Responsive page with simple design according to

## Build

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

$ go get -u
$ packr build
$ # or, to embed and install:
$ packr install

## Install
@@ -33,7 +33,7 @@ func render(input []byte) []byte {
r := bfchroma.NewRenderer(
bfchroma.Extend(bf.NewHTMLRenderer(bf.HTMLRendererParameters{Flags: flags})),
if GlobCSS == "" && r.Formatter.Classes {
@@ -89,6 +89,7 @@ It generates standalone HTML files that includes fonts, a grid system and extra
func init() {
rootCmd.PersistentFlags().StringP("output", "o", "out.html", "specify the path of the output HTML")
rootCmd.PersistentFlags().StringP("title", "t", "Ouput", "Specify the title of the HTML page")
rootCmd.PersistentFlags().String("theme", "monokai", "Specify the theme for syntax highlighting")
if err := viper.BindPFlags(rootCmd.PersistentFlags()); err != nil {
logrus.WithError(err).Fatal("Couldn't bind flags")

0 comments on commit 19748a0

Please sign in to comment.
You can’t perform that action at this time.