Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No menu entry if weight <= 0 #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{% assign pg = site.pages | sort: "weight" %}
{% for node in pg %}
<!-- Neglect imprint.html and index.html in either language -->
{% unless node.path contains "imprint" or node.path contains "index" %}
{% unless node.path contains "imprint" or node.path contains "index" or node.weight <= 0 %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the weight with non explicitly provided? And if it is zero, couldn’t we get rid of the first two special cases? And if it isn’t, why don’t we set it explicitly to zero for imprint and index and remove the special cases?

Copy link
Contributor Author

@knarrff knarrff Jun 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Will need to test this. I was so focused on "making my use-case work" and less on "how to make things nicer overall". :)

<!-- Set variable "node_conf2019" if node links to a conference page -->
{% assign node_conf2019 = false %}
{% if node.url contains "/conf2019/" %}
Expand Down