diff --git a/content/docs/docs/index.md b/content/docs/docs/index.md
index a62d32e..0754f59 100644
--- a/content/docs/docs/index.md
+++ b/content/docs/docs/index.md
@@ -31,8 +31,9 @@ Use the following syntax:
```toml
[extra]
sections = [
- "Usage", # Section 1
- "Extra" # Section 2
+ "Usage", # Section 1
+ "Markdown", # Section 2
+ "Advanced" # Section 3
]
```
diff --git a/templates/partials/docs_toc.html b/templates/partials/docs_toc.html
index 3b27380..9ade554 100644
--- a/templates/partials/docs_toc.html
+++ b/templates/partials/docs_toc.html
@@ -7,22 +7,26 @@
{%- for page in section.pages %}
- {%- if page.extra.section == 0 %}
- -
- {{ page.title }}
-
+ {%- if page.extra.section %}
+ {%- if page.extra.section == 0 %}
+ {% include "partials/docs_toc_item.html" %}
+ {%- endif %}
+ {%- else %}
+ {% include "partials/docs_toc_item.html" %}
{%- endif %}
{%- endfor %}
- {%- for section in section.extra.sections %}
- {% set int_section = loop.index %}
- {{ section }}
- {%- for page in section.pages %}
- {%- if page.extra.section == int_section %}
- -
- {{ page.title }}
-
- {%- endif %}
- {%- endfor %}
- {% endfor %}
+ {%- if section.extra.sections %}
+ {%- for section in section.extra.sections %}
+ {% set int_section = loop.index %}
+ {{ section }}
+ {%- for page in section.pages %}
+ {%- if page.extra.section %}
+ {%- if page.extra.section == int_section %}
+ {% include "partials/docs_toc_item.html" %}
+ {%- endif %}
+ {%- endif %}
+ {%- endfor %}
+ {% endfor %}
+ {%- endif %}
diff --git a/templates/partials/docs_toc_item.html b/templates/partials/docs_toc_item.html
new file mode 100644
index 0000000..1022d12
--- /dev/null
+++ b/templates/partials/docs_toc_item.html
@@ -0,0 +1,3 @@
+
+ {{ page.title }}
+