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

Conversation

knarrff
Copy link
Contributor

@knarrff knarrff commented Jun 9, 2024

This patch allows hosting of pages without a menu entry. At the moment, all pages would create a menu entry, even those without a weight set.

This patch allows hosting of pages without a menu entry. At the moment,
all pages would create a menu entry, even those without a weight set.
knarrff added a commit that referenced this pull request Jun 9, 2024
This page should list definitions of the term "research software"
together with their sources and noteable uses.

At the moment, this is a proposal, and thus, only available in English.
Once accepted, a German version would need to be created as well.

This PR depends on the PR #274 for the page not to show up in the main
manu.
@knarrff knarrff assigned fiveop and knarrff and unassigned fiveop Jun 9, 2024
@knarrff knarrff requested a review from fiveop June 9, 2024 11:29
@@ -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". :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants