From fb63fd56af1cdcd1ee439d09b67d0712ca324f2f Mon Sep 17 00:00:00 2001 From: Dhruv Makwana Date: Sun, 25 Apr 2021 14:18:12 +1200 Subject: [PATCH] Add bibliography ability --- bin/pdsite | 8 +++++++- themes/default/template.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/pdsite b/bin/pdsite index 536ebe5..3f7021f 100755 --- a/bin/pdsite +++ b/bin/pdsite @@ -119,8 +119,14 @@ function build(){ done + if [ -f ./references.bibtex ]; then + usebibliography="--bibliography $(readlink -f ./references.bibtex) --csl ${scriptpath%/*}/../ieee.csl" + else + usebibliography="" + fi + # Convert content files to context-aware HTML - find -path "$indexfileglob" -type f -execdir pandoc --template $themepath/template.html --toc -o index.html {} $localtree $localblock $configblock \; -delete + find -path "$indexfileglob" -type f -execdir pandoc $usebibliography --template $themepath/template.html --toc -o index.html {} $localtree $localblock $configblock \; -delete # Clean up find -path "*.tmp" -type f -delete diff --git a/themes/default/template.html b/themes/default/template.html index d48c46f..222e9af 100644 --- a/themes/default/template.html +++ b/themes/default/template.html @@ -88,7 +88,7 @@
$if(title)$ - + $endif$