refactor integrate_pandoc.sh
This part should be refactored, unit tests should be created for the MARKER replacement
# replace "MARKER" in .html files with research topics
for f in $RESEARCH_ROOT/static/build/plain/*html
do
filename=$(basename -- "$f")
sed -e "/MARKER/r $RESEARCH_ROOT/static/build/${filename%.html}_research.html" -e '/MARKER/d' $RESEARCH_ROOT/static/build/plain/$filename > "${filename%.html}"_final.html
done
# Building standalone topics and index
for f in $RESEARCH_ROOT/topics/*.md $RESEARCH_BUILD/index.md
do
filename=$(basename -- "$f")
sed -e "/MARKER/r $RESEARCH_ROOT/static/build/${filename%.md}_research.html" -e '/MARKER/d' $RESEARCH_ROOT/static/topic/topic-template.html > "${filename%.md}"_final.html
done