███╗ ███╗██████╗ ██████╗ ██╗ ██╗████████╗███╗ ███╗██╗
████╗ ████║██╔══██╗╚════██╗██║ ██║╚══██╔══╝████╗ ████║██║
██╔████╔██║██║ ██║ █████╔╝███████║ ██║ ██╔████╔██║██║
██║╚██╔╝██║██║ ██║██╔═══╝ ██╔══██║ ██║ ██║╚██╔╝██║██║
██║ ╚═╝ ██║██████╔╝███████╗██║ ██║ ██║ ██║ ╚═╝ ██║███████╗
╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝
md2html is a bash program that creates html files with custom css from a specified directory of markdown files using pandoc.
- pandoc 2.10.1
- bash 5.0.17(1)-release
Ensure pandoc and bash that meet or exceed the version numbers noted above are installed on your system.
git clone https://www.github.com/jsstanley/md2html.git/
In your .bashrc
file (usually found at ~/.bashrc), add:
alias md2html="FULL_PATH_TO_MD2HTML"
Reboot your machine or run the following in the terminal:
. ~/.bashrc
You should now be able to use md2html from anywhere on the command line.
An example css file (
custom.css
) has been provided in this repository.
md2html ~/notes/md/ ~/notes/css/
md2html requires two positional arguments:
- The absolute directory path containing the markdown files
- The absolute directory path containing the custom css file
md2html will create a directory of html files within the directory of markdown files that was specified. For the above example, the html directory would be ~/notes/md/html/
.
© 2020 Jay Stanley. Released under the GNU General Public License, version 2 (GPLv2).