Skip to content
Custom Markdown to HTML converter I use for posts on timchauvin.com
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
LICENSE.md
README.md
md-html.py

README.md

timchauvin-md-html

Custom Markdown to HTML converter I use for posts on timchauvin.com

Table of contents

Features

See demo/index.md and demo/index.html.

Installation

Let's call MDHTMLPATH the path where you want to install this program, and WEBSITEPATH the path to your website.

  1. Go to your installation path: cd MDHTMLPATH
  2. Clone the repo: git clone https://github.com/timotheechauvin/timchauvin-md-html (or download it and unzip it)
  3. Now add a function in your ~/.bashrc file (or its equivalent on your OS) to speed up future uses:
md() { # execute timchauvin-md-html on the folder given by the only argument
    python MDHTMLPATH/timchauvin-md-html/md-html.py WEBSITEPATH/$1
}

Finally, modify md-html.py to suit your needs.

Usage

The directory structure must look like this:

WEBSITEPATH
├── post1
│   ├── index.html
|   └── index.md
├── post2
│   ├── index.html
|   └── index.md
└── ...

(You don't have to create the index.html files by yourself).

Then to convert post1/index.md into post1/index.html, simply type md post1.

If you didn't create the function md() above, the process is much longer:

cd MDHTMLPATH/timchauvin-md-html
python md-html.py WEBSITEPATH/post1

Contributing

Issues, feedback and pull requests are all warmly welcome!

License

This project is under the MIT license.

You can’t perform that action at this time.