The landings subject provides components and logic for rendering various types of landing pages across docs.github.com, including the Docs home page, product landing pages, product guides pages, category pages, and specialized layouts like journey and discovery landings.
This subject is responsible for:
- Rendering different landing page layouts (product, guides, category, journey, discovery, bespoke)
- Building and displaying featured links, article cards, and guide cards
- Managing landing page context and data requirements
- Providing hierarchical navigation for products and categories
- Displaying article carousels and product releases
Landing pages serve as navigational hubs that provide a hierarchical view of their area, making it easier to find and discover documentation.
| Landing Page Type | Layout Value | Purpose |
|---|---|---|
| Product landing | product-landing |
Product overview pages with featured links and release notes |
| Category landing | category-landing |
Category pages with hierarchical navigation |
| Table of contents | toc-landing |
Table of contents pages |
| Journey landing | journey-landing |
Guided learning journey pages with track navigation |
| Discovery landing | discovery-landing |
Discovery/exploration pages |
| Home page | (special) | Docs.github.com homepage |
npm run test -- src/landings/tests- Page frontmatter:
layout,featuredLinks,journeyTracks, etc. - Content tree: Used to build TOC and navigation hierarchies
- Product metadata: Product names, versions, release information
@/frame- Context object, page data, shared components@/content-render- Renders Liquid in featured link titles@/journeys- Journey track components and data@/products- Product metadata and groupings@/versions- Version-aware content filtering
req.context.featuredLinks- Resolved featured link data- Landing page contexts - Various context objects passed to React components
- Rendered landing pages - Final HTML output
- Multiple similar but distinct landing components (could be consolidated)
- Featured links limited to 4 per category to avoid overly tall columns
- Bespoke landing pages require custom components rather than data-driven approach
- Standardize landing page patterns and consolidate overlapping types
- Make landing pages more data-driven and less code-heavy