GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - synbioz/md: Convert md to html, pdf…

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
css
css
 
 
images
images
 
 
.gitignore
.gitignore
 
 
Gemfile
Gemfile
 
 
README.md
README.md
 
 
Thorfile
Thorfile
 
 
layout.html
layout.html
 
 
render.sh
render.sh
 
 

Repository files navigation

MD

Description

MD is a Thorfile to convert Markdown files to HTML and PDF versions.

The real power of MD Thorfile is that it uses a customizable HTML layout and CSS.

Features:

  • convert .md to .html with layout and CSS styling
  • convert .md to .pdf with layout and CSS styling

Installation

git clone git://github.com/synbioz/md.git
cd md
bundle install
thor md:setup # Copy default layout and css

thor install Thorfile

You can remove this clone since the Thorfile is installed system-wide.

Usage

On the command-line:

$ thor md:generate my_markdown_file.md # Generates "my_markdown_file.html"
$ thor md:generate my_markdown_file.md -f pdf # Generates "my_markdown_file.pdf"

Theme edition

When working on themes, you need to edit styles in ~/.config/md/themes/. To render the .pdf each time you update styles you can use a watch :

watch ./render.sh ~/.config/md/themes/**

Settings and customization

MD can be configured through an Mdfile placed in directory where you launch the command.

Mdfiles have two purposes:

  • Setting internal Markdown options through the markdown_option method,
  • Extending the default Markdown renderer by supplying a block to the renderer method.

For details about options and custom renderers, have a look at the Redcarpet docs.

Here is and example Mdfile:

markdown_options no_links: true,
                 no_images: true

renderer do
  def block_code(code, language)
    "#{language}: <pre>#{code}</pre>"
  end
end

Other

If you want to contribute or report bugs you should take a look at:

  • Homepage
  • Source Style
  • Ticket Guidelines
  • Contributing

Problems, comments, and suggestions are welcome on the issue tracker.

Authors

  • Martin Catty (aka _fuse)
  • Nicolas Cavigneaux (aka Bounga)

Copyright (c) 2011 Synbioz, released under the MIT license.

About

Convert md to html, pdf…

Resources

Readme
Activity
Custom properties

Stars

21 stars

Watchers

16 watching

Forks

11 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.