Skip to content

Commit

Permalink
refactor: use yaml attribute node.exclude for not displaying pages, f…
Browse files Browse the repository at this point in the history
…ixes warning nopage layout does not exist
  • Loading branch information
Yagnap committed Feb 23, 2024
1 parent 5cf591b commit 6f4f607
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ <h1>

{% assign pages_list = site.pages | sort: 'order' %}
{% for node in pages_list %}
{% if node.title != null %}
{% if node.layout == "page" %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href=".{{node.url}}">{{ node.title }}</a>
{% unless node.exclude %}
{% if node.title != null %}
{% if node.layout == "page" %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href=".{{node.url}}">{{ node.title }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endunless %}
{% endfor %}

<a class="sidebar-nav-item" href="{{ site.github.org }}" target="_blank">GitHub</a>
Expand Down
3 changes: 2 additions & 1 deletion projects.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
layout: nopage
layout: page
title: Projects
order: 30
exclude: true
---
## Projects
* [ANNO](https://annosaxfdm.de)
Expand Down

0 comments on commit 6f4f607

Please sign in to comment.