Landing pages

May 5, 2026 ยท View on GitHub

The landings subject provides components and logic for rendering various types of landing pages across docs.github.com, including the Docs home page, category pages, and specialized layouts like journey, discovery, and bespoke landings.

Purpose & Scope

This subject is responsible for:

  • Rendering different landing page layouts (toc, 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

Landing pages serve as navigational hubs that provide a hierarchical view of their area, making it easier to find and discover documentation.

Architecture & Key Assets

Landing Page TypeLayout ValuePurpose
Category landingcategory-landingCategory pages with hierarchical navigation
Table of contentstoc-landingTable of contents pages
Journey landingjourney-landingGuided learning journey pages with track navigation
Discovery landingdiscovery-landingDiscovery/exploration pages
Bespoke landingbespoke-landingCustom hand-built landing pages
Home page(special)Docs.github.com homepage

Setup & Usage

Running tests

npm run test -- src/landings/tests

Data & External Dependencies

Data inputs

  • Page frontmatter: layout, featuredLinks, journeyTracks, etc.
  • Content tree: Used to build TOC and navigation hierarchies
  • Product metadata: Product names, versions, release information

Dependencies

Data outputs

  • req.context.featuredLinks - Resolved featured link data
  • Landing page contexts - Various context objects passed to React components
  • Rendered landing pages - Final HTML output

Current State & Next Steps

Known limitations

  • 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

Areas for improvement

  • Standardize landing page patterns and consolidate overlapping types
  • Make landing pages more data-driven and less code-heavy