Last active
December 19, 2015 17:17
-
-
Save alan-mushi/da0ad1a8ed4434b67c2e to your computer and use it in GitHub Desktop.
Generate a HTML page from markdown files with Bootstrap CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
check_args=${@:?You forgot the markdown file(s) as arg} | |
cat << EOF | |
<html> | |
<head> | |
<title></title> | |
<!-- Bootstrap css themes --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> | |
<!-- Bootstrap's .container is too large --> | |
<style> | |
.container { | |
width: 80ch; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
EOF | |
for i in $@; do | |
markdown $i | |
done | |
cat << EOF | |
</div> | |
</body> | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment