build markdown on indexes
This commit is contained in:
parent
cf21d895cc
commit
135014d24a
2 changed files with 8 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ cd $(dirname $1)
|
|||
get_page_metadata $page
|
||||
|
||||
if [[ $is_toc == "true" ]]; then
|
||||
build_toc $page
|
||||
build_toc "$page" "$process_markdown"
|
||||
elif [[ $process_markdown == "false" ]]; then
|
||||
build_header index.html
|
||||
cat $page | sed -e '1,/END ARISE/d' | cat >> index.html
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ build_toc() (
|
|||
|
||||
# Throw the metadata header together and add the source file to the list of files to remove in cleanup
|
||||
toc_source=$(basename $1)
|
||||
append_markdown="$2"
|
||||
cd $(dirname $1)
|
||||
get_page_metadata $toc_source
|
||||
echo "$(realpath $toc_source)" >> $removelist
|
||||
|
|
@ -42,6 +43,12 @@ done
|
|||
sort -r $toc_tmp >> index.html
|
||||
rm $toc_tmp
|
||||
|
||||
# After building TOC table
|
||||
if [[ "$append_markdown" == "true" ]]; then
|
||||
# append markdown content from the same page
|
||||
sed -e '1,/END ARISE/d' "$toc_source" | pandoc -f markdown -t html >> index.html
|
||||
fi
|
||||
|
||||
# Final page bits
|
||||
cat >> index.html <<EOF
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue