Skip to content

Instantly share code, notes, and snippets.

@johana-star
Created May 7, 2015 04:48
Show Gist options
  • Save johana-star/c7c2e4e9c4eff4b0e22d to your computer and use it in GitHub Desktop.
Save johana-star/c7c2e4e9c4eff4b0e22d to your computer and use it in GitHub Desktop.
The beginning of a site generator using Pandoc.
#!/bin/bash
for file in `ls ./posts/*.markdown`
do
shortname=`expr $file : '.*[[:digit:]]-\(.*\).markdown' `
pandoc --smart \
--from=markdown+yaml_metadata_block \
$file \
--output ./site/$shortname .html
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment