Conversation
|
/assign |
Signed-off-by: LibenHailu <libenhailu04@gmail.com>
aecfe1c to
c9ab6c0
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
The sidebar appears correctly, however there is a "Docs" section appearing as well (unresponsive). While it appears to be the index of the entire page, there are some discrepancies:
Documentation page: "Docs", bold; bold and green (when a persona is selected); cannot be clicked on otherwise
Blogs page: Nothing
Community page: "Community", regular; cannot be clicked on when you transition to a different page
@klocke-io @marc1404 Could you please check if that is due to an issue on our side?
There was a problem hiding this comment.
@LibenHailu, I'm sorry it took me so long to review your PR and provide feedback! 🙇♂️
I've looked into the issue that @n-boshnakov reported with this change and could replicate it locally as well. I've opened a PR of my own (#839) to address the missing pages in the sidebar, taking a slightly different approach.
Nonetheless, I've left 2 comments on your PR here to provide some general feedback :)
If #839 is accepted and merged, I'd propose closing your PR here if you're okay with it.
| function normalizeLink(link: string): string { | ||
| // Normalize by replacing trailing '/_index' with '/index' and removing trailing slash | ||
| return link.replace(/\/_index$/, '/index').replace(/\/$/, '').concat('.md'); | ||
| } |
There was a problem hiding this comment.
Could you explain why you added this function?
GitHub Pages as a hosting platform always adds and expects trailing slashes at the end of URLs.
There was a problem hiding this comment.
The sidebar object had normalized links for some pages for example:
https://gardener.cloud/docs/contribute/code/contributing-bigger-changes/
instead of:
https://gardener.cloud/docs/contribute/code/contributing-bigger-changes/index
However, the sidebar object for nested pages lacked this normalized behavior. That’s why I replaced the links to remove _index, so the page URLs wouldnt have _index appended to them.
There was a problem hiding this comment.
Makes sense! Thanks for the explanation
|
|
There was a problem hiding this comment.
General note: This PR includes many formatting changes. It's fine to improve the formatting with a PR, especially since it's not automatically formatted in this repository (yet).
However, it's a good idea to separate formatting changes into their own commit, as it makes reviewing the diff of a PR easier.
Sure It can be closed |
/kind enhancement bug
What this PR does / why we need it:
This PR aims to fix sidebar processing so that the community roles page and other missing pages can appear on the left hand sidebar.
Which issue(s) this PR fixes:
Fixes #732