Last active
April 4, 2022 08:22
-
-
Save magmax/ccdcb8e11617a8908575ef9d18d5fe72 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
if [ ! -f "README.md" ]; then | |
( | |
echo "# FIXME" | |
echo | |
echo "Please, fill this file in" | |
) > README.md | |
fi | |
if [ ! -f "index.html" ]; then | |
cat << EOF > index.html | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css"> | |
<style> | |
.markdown-section { | |
max-width: 1200px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="app">Please wait...</div> | |
<script> | |
window.\$docsify = { | |
loadSidebar: true, | |
subMaxLevel: 3, | |
search: 'auto', | |
} | |
</script> | |
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script> | |
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script> | |
<script src="//unpkg.com/docsify-copy-code"></script> | |
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script> | |
<script src="//unpkg.com/prismjs/components/prism-python.min.js"></script> | |
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script> | |
<script src="//unpkg.com/prismjs/components/prism-yaml.min.js"></script> | |
</body> | |
</html> | |
EOF | |
fi | |
( | |
echo "Guide"; | |
echo; | |
for i in *.md; do | |
if [ "$i" == "_sidebar.md" ]; then | |
continue | |
fi | |
echo "* [$(basename $i)]($i)"; | |
done | |
) > _sidebar.md | |
echo "Done! Remember a web server is required to make this work." | |
echo "you can do it easily with `python3 -m http.server 8000`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment