Markdown Dashboard with Ruby

Author: MikeW    Date: 2016-08-28 11:07   

Linked below is a simple Ruby script for creating an HTML dashboard using the Markdown text markup language and a Ruby script. Click the following link to see a sample of the dashboard. A link to the script and sample content is also included.

Dashboard Example

Dashboard Picture

Download here: dash.zip

The Markdown content looks something like this:

# Dashboard 3 Title - Header 1

## Header 2

* Bullet
* Bullet
* Bullet

### Header 3

* Item
* Item

#### Header 4

Para here.

> Quoted text here

How the Dashboard Works

The dashboard consists of a few components. The page content is wrapped with head.html and footer.html. And content is styled with dash.css. You can, of course, modify these file if you wish. Any Markdown css should work good with the content.

For the script to find your content files, simple start the file name with a two digit number and end the file in .md. For example 01mynotes.md. Tabs appear in the dashboard page based on the numbering of the files. So if you want a file to come first, it should be start with "01". Then pages that follow should start with "02", "03", and so on.

To generate the output file, just run the Ruby script and redirect the output to a file, for example: mkdash.rb > index.html. All "XX*.md" files will be included in the resulting output file.

Requirements

To use this script you must have the following components installed.

  • Ruby 1.8.7 or later
  • RubyGems
  • The Kramdown Ruby gem.