Add check for page title for homepage featured items
What does this MR do and why?
Fixes a minor bug with the homepage featured content area (the lists of pages in the tabs at the top).
A page that was recently moved or renamed will have a redirect in its place, so it could still be included here: we just check that the item exists before rending a list item for it. But if it's a redirect rather than a regular page, it appears without a title. This results in a gap in the grid where we have a link, but no text.
This MR adjusts the existing logic to verify that each featured item has a title, rather than just exists, before rendering it in the tabbed content area.
Screenshots, screen recordings, or links to review app
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Edit content/_data/landing.yaml
and include a page that used to exist, but is not a redirect (e.g,/ee/user/ai_features.md
). -
Run the preview site and visit the homepage. The redirect page is no longer included in the list (no empty-looking list items appear).
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.