diff --git a/CHANGELOG b/CHANGELOG index 487edfaf3823406f581d781451471f893559cf82..95881f06a3f45311aee2b825a65b849eaaf34170 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ mkdocs-material-0.2.1 (2016-03-12) * Fixed #10: Invisible header after closing search bar with ESC key * Fixed #13: Table cells don't wrap + * Fixed empty list in table of contents when no headline is defined * Corrected wrong path for static asset monitoring in Gulpfile.js * Set up tracking of site search for Google Analytics diff --git a/material/nav.html b/material/nav.html index d4641b8bef6f39b36bd51623fe71e48db7da22b6..c926c085b448aa6b7897dfad56de7d1b23b7512a 100644 --- a/material/nav.html +++ b/material/nav.html @@ -16,7 +16,7 @@ {% if h1 %} {% set toc = (toc | first).children %} {% endif %} - {% if toc %} + {% if toc and (toc | first) %} <ul> {% for toc_item in toc %} <li class="anchor"> diff --git a/src/nav.html b/src/nav.html index 1262d3446add68d5666c967788076b162b8e91a6..1d70b9fc11a87ccb850a96b017556f45a61ab26c 100644 --- a/src/nav.html +++ b/src/nav.html @@ -33,7 +33,7 @@ {% endif %} <!-- Render anchors of active page --> - {% if toc %} + {% if toc and (toc | first) %} <ul> {% for toc_item in toc %}