revert md on tocs
This commit is contained in:
parent
0369cbffd2
commit
5de3a66916
2 changed files with 1 additions and 8 deletions
|
|
@ -17,7 +17,7 @@ cd $(dirname $1)
|
||||||
get_page_metadata $page
|
get_page_metadata $page
|
||||||
|
|
||||||
if [[ $is_toc == "true" ]]; then
|
if [[ $is_toc == "true" ]]; then
|
||||||
build_toc "$page" "$process_markdown"
|
build_toc "$page"
|
||||||
elif [[ $process_markdown == "false" ]]; then
|
elif [[ $process_markdown == "false" ]]; then
|
||||||
build_header index.html
|
build_header index.html
|
||||||
cat $page | sed -e '1,/END ARISE/d' | cat >> index.html
|
cat $page | sed -e '1,/END ARISE/d' | cat >> index.html
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ build_toc() (
|
||||||
|
|
||||||
# Throw the metadata header together and add the source file to the list of files to remove in cleanup
|
# Throw the metadata header together and add the source file to the list of files to remove in cleanup
|
||||||
toc_source=$(basename $1)
|
toc_source=$(basename $1)
|
||||||
append_markdown="$2"
|
|
||||||
cd $(dirname $1)
|
cd $(dirname $1)
|
||||||
get_page_metadata $toc_source
|
get_page_metadata $toc_source
|
||||||
echo "$(realpath $toc_source)" >> $removelist
|
echo "$(realpath $toc_source)" >> $removelist
|
||||||
|
|
@ -43,12 +42,6 @@ done
|
||||||
sort -r $toc_tmp >> index.html
|
sort -r $toc_tmp >> index.html
|
||||||
rm $toc_tmp
|
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
|
# Final page bits
|
||||||
cat >> index.html <<EOF
|
cat >> index.html <<EOF
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue