Skip to content

Commit

Permalink
Remove 'Contact dxw' from index pages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yndajas committed Oct 17, 2023
1 parent e389061 commit c60eb21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_includes/page-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>{{ page.title }}</h1>
{% assign stripped_content = content | strip %}
{% if stripped_content == "" %}
<ul>
{% include related_pages.html %}
{% include related_pages.html in-nav=false %}
</ul>
{% else %}
{% include anchor_headings.html html=content anchorBody="#" anchorAttrs='aria-label="Permalink to %heading%"' %}
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/related.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% endunless %}
{% endif %}

{% include related_pages.html %}
{% include related_pages.html in-nav=true %}
</ul>
</nav>
</aside>
3 changes: 3 additions & 0 deletions src/_includes/related_pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{% endunless %}
{% endfor %}
{% endfor %}

{% if include.in-nav %}
<li>
<a href="https://www.dxw.com/contact/">Contact dxw</a>
</li>
{% endif %}

0 comments on commit c60eb21

Please sign in to comment.