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

MBP-622: Hardening the method for getting pattern index files #411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danmacpherson
Copy link
Collaborator

There's a bug in Hugo versions in the range of 0.123.0 to 0.123.4 that causes our patterns browser to render incorrectly. It seems that the all levels of child pages in a top-level Section consider themselves to be that section instead of sub-sections. So instead of using "Section" to identify pattern index pages, we'll now determine which pages are index pages using the parent path. Anything that uses "/patterns" as a parent path is considered an index file in our pattern browser.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 29, 2024

@danmacpherson: This pull request references MBP-622 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set.

In response to this:

There's a bug in Hugo versions in the range of 0.123.0 to 0.123.4 that causes our patterns browser to render incorrectly. It seems that the all levels of child pages in a top-level Section consider themselves to be that section instead of sub-sections. So instead of using "Section" to identify pattern index pages, we'll now determine which pages are index pages using the parent path. Anything that uses "/patterns" as a parent path is considered an index file in our pattern browser.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@mbaldessari
Copy link
Contributor

This is an automated message:

You can preview this docs PR at http://411.docs-pr.validatedpatterns.io
Note that they get generated every five minutes, so please wait a bit.

@openshift-ci openshift-ci bot added the size/XS label Feb 29, 2024
Add a check to determine if the page is branch. If it is, then it's
an index page for a pattern and should be included.
@danmacpherson
Copy link
Collaborator Author

Trying a different fix to harden the patterns index page detection since the previous fix didn't work on older versions of Hugo. For this fix, we just add a filter to only include pages that have "branch" BundleType.

Tested on Hugo 0.121.0, 0.122.0, 0.123.0, 0.123.4, 0.123.5, and latest (0.123.7). All seems to work.

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

Successfully merging this pull request may close these issues.

3 participants