Skip to content

Instantly share code, notes, and snippets.

@gusaaaaa
Last active December 16, 2015 12:59
Show Gist options
  • Save gusaaaaa/5438060 to your computer and use it in GitHub Desktop.
Save gusaaaaa/5438060 to your computer and use it in GitHub Desktop.
Bootstraps an empty HTML5 structure
# Outputs an empty HTML5 structure.
# Usage:
# emptyhtml5 [--with-script] [--with-style]
while [ $# -ne 0 ]
do
if [[ "$1" == "--with-script" ]]; then
script="
<script src=\"[youscript.js]\"></script>"
elif [[ "$1" == "--with-style" ]]; then
style="
<link href=\"[yourstyle.css]\" rel=\"stylesheet\">"
fi
shift
done
echo "<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
<title>[Page title]</title>$script$style
</head>
<body>
</body>
</html>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment