Skip to content

Commit cf8e992

Browse files
committed
Fixed empty list in table of contents when no headline is defined
1 parent bf227de commit cf8e992

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ mkdocs-material-0.2.1 (2016-03-12)
22

33
* Fixed #10: Invisible header after closing search bar with ESC key
44
* Fixed #13: Table cells don't wrap
5+
* Fixed empty list in table of contents when no headline is defined
56
* Corrected wrong path for static asset monitoring in Gulpfile.js
67
* Set up tracking of site search for Google Analytics
78

material/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{% if h1 %}
1717
{% set toc = (toc | first).children %}
1818
{% endif %}
19-
{% if toc %}
19+
{% if toc and (toc | first) %}
2020
<ul>
2121
{% for toc_item in toc %}
2222
<li class="anchor">

src/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{% endif %}
3434

3535
<!-- Render anchors of active page -->
36-
{% if toc %}
36+
{% if toc and (toc | first) %}
3737
<ul>
3838
{% for toc_item in toc %}
3939

0 commit comments

Comments
 (0)