You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pages in the security_updates collection (example security update page) do not show the correct "current" page in the side navigation.
Problem details
This is happening because current.html connects the side nav with posts in a given collection by checking for the parent page's subnav.type and matching it with the collection declared in config.yml.
However, the security.md file has two subnav declarations in its front matter, which is causing subnav.type to be ignored.
Next steps
We should:
Consider if we still need these security updates from v2 on our site, or if they can be considered outdated.
If we need them, consider replacing subnav.type: security_updates in the page's front matter with type: security_updates.
I recommend we remove the subnav.type check in lines 7-8 and replace it with the check added in lines 14-15.
Currently, there is only one other page that uses subnav.type: security.md. Replacing subnav.type with type here should still connect it to the expected collection in config.yml.
I don't see anything in the repo relating to page.type that would cause any regressions, but of course we would want to test that. If we move forward with this approach, we would also need to make an update to the front matter in security.md.
Curious to hear thoughts on this approach and proposed additional change.
Summary
The pages in the
security_updates
collection (example security update page) do not show the correct "current" page in the side navigation.Problem details
This is happening because current.html connects the side nav with posts in a given collection by checking for the parent page's
subnav.type
and matching it with the collection declared in config.yml.However, the security.md file has two
subnav
declarations in its front matter, which is causingsubnav.type
to be ignored.Next steps
We should:
subnav.type: security_updates
in the page's front matter withtype: security_updates
.type
data key.Related issue
This is a follow up to the conversation in PR #2958
Comment from #2958
Originally posted by @amyleadem in #2958 (comment)
The text was updated successfully, but these errors were encountered: