First commit
This commit is contained in:
commit
976dc1adcf
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
PAGE=${REQUEST_URI#/}
|
||||||
|
if [ -z $PAGE ]
|
||||||
|
then
|
||||||
|
PAGE=Home
|
||||||
|
fi
|
||||||
|
|
||||||
|
pandoc="pandoc -f gfm -t html -s --template=$TEMPLATE -V title-prefix:$SITE_TITLE -V pagetitle:$PAGE"
|
||||||
|
|
||||||
|
git show HEAD:"$PAGE".md > /dev/null
|
||||||
|
|
||||||
|
if [ $? == 0 ]
|
||||||
|
then
|
||||||
|
echo HTTP/1.0 200 OK
|
||||||
|
echo
|
||||||
|
git show HEAD:"$PAGE".md | $pandoc
|
||||||
|
else
|
||||||
|
echo HTTP/1.0 404 Not found
|
||||||
|
echo
|
||||||
|
echo "This page does not exist. [Click here]($REPO_URL/wiki/$PAGE?action=_new) to create it." | $pandoc
|
||||||
|
fi
|
Loading…
Reference in New Issue