#!/bin/bash # Create the basic four files: # * styling # * nav bar # * index page # * template mkdir -p _static cat > _static/style.css << EOF body { font-family: system-ui; max-width: 70ch; padding: 2ch; margin: auto; color: #222; background: #fed; } a{color:#a44} a:visited{color:#555} img{max-width:100%} pre{overflow:auto} table,th,td{border:1px solid;padding:.5rem;border-collapse: collapse} nav ul{display: none; list-style: none; padding: 0} nav #checkbox{opacity: 0} nav #checkbox:checked + ul{display: block EOF cat > nav.md << EOF * [home](/) * [blog](/blog) * [research](/research) EOF cat > index.p.md << EOF # Homepage Welcome to my site! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud [exercitation](https://wikipedia.org) ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. EOF cat > p.template.html << EOF !!# Default 'Page' Template !!#========================= !!# See pp(1) for syntax: !! !!# See 'ppages help' for templating documentation !! echo "\$TITLE" !! echo ""

!! echo "\$TITLE"

!!# The nav bar is compiled from a file if it exists !! [ ! -f nav.md ] || echo ''
!!# Below we are piping the found *..md file through pandoc !!# in this file's name comes from .template.html !! pandoc < \$PAGE !!# Optional footer with link to the generator