Skip to content
Louis Maddox edited this page Aug 21, 2016 · 8 revisions

version 1

cd /gits/copermut.wiki; git pull

cd /gits/copermut.github.io; rm _posts/*.md

cd _wiki/
for filename in *.md; do
echo "---
layout: post
---" >> ../_posts/"2000-01-01-$filename"
cat $filename >> ../_posts/"2000-01-01-$filename"
done;
cd ..

version 2

cd /gits/copermut.wiki/
git pull
cp /gits/copermut.wiki/*.md /gits/copermut.github.io/_wiki/
cd /gits/copermut.github.io/_wiki/
git pull # get any web interface-added pages (bad idea to do!)
echo "Press any key to proceed"
read dummyvar
for filename in *.md; do
        echo "---" > ../_posts/"2000-01-01-$filename"
        echo "layout: post" >> ../_posts/"2000-01-01-$filename"
        echo "---" >> ../_posts/"2000-01-01-$filename"
        # prepend YAML layout header to ensure it's rendered by Jekyll
        cat $filename >> ../_posts/"2000-01-01-$filename"
done
echo "just 'getgot' or write a commit message and push to the site"
  • versioned in dot-scripts repo: sync_to_site.sh, softlinked in exports » syncopermut available on the command line

  • liquid templating code in index.html strips out the meaningless date filename prefix, it's just required to use posts for now (switch to collections when convenient)

Clone this wiki locally