From c60eb219a9dbac40a94a1bbdbdf9ba35a83e2eb2 Mon Sep 17 00:00:00 2001 From: Ynda Jas Date: Mon, 16 Oct 2023 21:04:30 +0100 Subject: [PATCH] Remove 'Contact dxw' from index pages Index pages (i.e. pages which have children but not their own content) include the same partial as the nav menu. This menu includes a 'Contact dxw' link, which looks a little out of place in the body of the index page. This makes it so that the 'Contact dxw' link will only appear in the nav, not the list of child pages on index pages --- src/_includes/page-content.html | 2 +- src/_includes/related.html | 2 +- src/_includes/related_pages.html | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/_includes/page-content.html b/src/_includes/page-content.html index a5bd3f0cb..7c64fd493 100644 --- a/src/_includes/page-content.html +++ b/src/_includes/page-content.html @@ -8,7 +8,7 @@

{{ page.title }}

{% assign stripped_content = content | strip %} {% if stripped_content == "" %} {% else %} {% include anchor_headings.html html=content anchorBody="#" anchorAttrs='aria-label="Permalink to %heading%"' %} diff --git a/src/_includes/related.html b/src/_includes/related.html index c48f58ea9..beb01a4f5 100644 --- a/src/_includes/related.html +++ b/src/_includes/related.html @@ -11,7 +11,7 @@ {% endunless %} {% endif %} - {% include related_pages.html %} + {% include related_pages.html in-nav=true %} diff --git a/src/_includes/related_pages.html b/src/_includes/related_pages.html index d9ed7ba32..0a9d07e00 100644 --- a/src/_includes/related_pages.html +++ b/src/_includes/related_pages.html @@ -12,6 +12,9 @@ {% endunless %} {% endfor %} {% endfor %} + +{% if include.in-nav %}
  • Contact dxw
  • +{% endif %}