diff --git a/templates/index.html b/templates/index.html index d4c407d..a1db8ac 100644 --- a/templates/index.html +++ b/templates/index.html @@ -131,7 +131,11 @@
{% block content -%} - {{ section.content | safe }} + {%- if section.word_count > 0 -%} + {{ section.content |safe }} + {%- else -%} + {%- include "sec_toc_2_level.html" -%} + {% endif -%} {% endblock content %}
diff --git a/templates/sec_toc_2_level.html b/templates/sec_toc_2_level.html new file mode 100644 index 0000000..a9e730b --- /dev/null +++ b/templates/sec_toc_2_level.html @@ -0,0 +1,20 @@ +

Table of Contents

+{% if section.subsections -%} + +{% else -%} +

No Sections Found

+{% endif -%}