From c09f86cd1d0bec63d865dc308ee1461e161ea337 Mon Sep 17 00:00:00 2001
From: Kaspar Etter <me@kasparetter.com>
Date: Fri, 18 Oct 2019 12:07:10 +0200
Subject: [PATCH] Fix duplicate entries in default.html

Removes children from the table of contents that
belong to a different page with the same title.
---
 _layouts/default.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_layouts/default.html b/_layouts/default.html
index b1d3c724..e198b4bc 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -77,7 +77,7 @@ layout: table_wrappers
             {% assign children_list = site.pages | sort:"nav_order" %}
             <ul>
               {% for child in children_list %}
-                {% if child.parent == page.title and child.title != page.title %}
+                {% if child.parent == page.title and child.title != page.title and child.grand_parent == page.parent %}
                 <li>
                   <a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
                 </li>
-- 
GitLab