Skip to content

Commit 93571b8

Browse files
Fix(docs): Remove useless duplicates from menu.
1 parent 358db1a commit 93571b8

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

docs_theme/css/default.css

+3
Original file line numberDiff line numberDiff line change
@@ -453,3 +453,6 @@ ul.sponsor {
453453
padding: 0.4rem 0.6rem;
454454
}
455455

456+
.doc.doc-object.doc-class .doc.doc-heading {
457+
display: none;
458+
}

docs_theme/main.html

+11-7
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,19 @@ <h3 id="myModalLabel">Documentation search</h3>
8686
{% endif %}
8787

8888
{% for toc_item in page.toc %}
89-
<li class="{% if page and not page.is_homepage %}main{% endif %}">
90-
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
91-
</li>
92-
93-
{% for toc_item in toc_item.children %}
94-
<li>
89+
{% if not toc_item.url.startswith('#rest_framework.') %}
90+
<li class="{% if page and not page.is_homepage %}main{% endif %}">
9591
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
9692
</li>
97-
{% endfor %}
93+
94+
{% for child in toc_item.children %}
95+
{% if not child.url.startswith('#rest_framework.') %}
96+
<li>
97+
<a href="{{ child.url }}">{{ child.title }}</a>
98+
</li>
99+
{% endif %}
100+
{% endfor %}
101+
{% endif %}
98102
{% endfor %}
99103

100104
<div class="promo">

0 commit comments

Comments
 (0)