mikemaelzer / words

If you wish to make a webpage…

If you wish to make a webpage, you must first boil the ocean.
-Carl Sagan

I was in a quandry. I wanted to write some bloviating posts with stylized code snippets (sorry medium). I didn’t want to pay any money (sorry svbtle). I didn’t want a solution that tries to do everything even though all I want to do is turn simple markdown files into html (sorry jekyll). So I did what millions of people before me have done, I reinvented the wheel.

Behold mdp, a command line tool that takes markdown files and a template file and does exactly what I want, it generates stupid html files. As an added bonus, this gave me an opportunity to play around in Go.

Now I run a simple build script to generate the whole shebang.


# Generate html from markdown using the wonderful mdp tool
mdp -i "src/md/*.md" -o . -t src/layout.html
# Uglify and concat our js files into a single bundle
uglifyjs -c -m -o static/bundle.js $(find src/js/ -name "*.js")
# Concat our css files into a single file
cat src/css/*.css > static/styles.css