2 bug fixes - git not always working and verbose pandoc

Pandoc would output warnings about a lack of title, although we are not
using it in the template.

Also, the tool would fail to do some git commands because it was
checking the wrong folder
master
Jonathan Hodgson 3 years ago
parent 6641d61b1f
commit 7a032b7cdb
  1. 2
      inc/to-html
  2. 4
      kb

@ -52,7 +52,7 @@ to-html(){
local newFile="${file##*/}"
newFile="${newFile/.md/.html}"
sed -E 's/\.md( *)\)/.html\1\)/' "$file" |
pandoc -f markdown -t html --template "$templateFile" > "$destination/$newFile"
pandoc --quiet -f markdown -t html --template "$templateFile" > "$destination/$newFile"
done
rsync -a \

4
kb

@ -330,12 +330,14 @@ mainScript() {
############## Begin Script Here ###################
####################################################
if [ "${args[0]}" != "init" ]; then
#cd "$dataDir" || return
olddir="$PWD"
cd "$dataDir" || return
# Check to see if datadir is a git repo
if ! git rev-parse 2> /dev/null; then
# If not, ensure we don't run git commands
dogit=0
fi
cd "$olddir" || return
fi
case "${args[0]}" in

Loading…
Cancel
Save