|
1 | 1 | # Landing pages |
2 | 2 |
|
3 | | -Landing pages include the Docs home page, the product landing pages, and product guides pages. |
| 3 | +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. |
4 | 4 |
|
5 | | -## What landing pages are for |
| 5 | +## Purpose & Scope |
6 | 6 |
|
7 | | -Landing pages provide a hierarchical view of their area, making navigating the Docs easier. |
| 7 | +This subject is responsible for: |
| 8 | +- Rendering different landing page layouts (product, guides, category, journey, discovery, bespoke) |
| 9 | +- Building and displaying featured links, article cards, and guide cards |
| 10 | +- Managing landing page context and data requirements |
| 11 | +- Providing hierarchical navigation for products and categories |
| 12 | +- Displaying article carousels and product releases |
| 13 | + |
| 14 | +Landing pages serve as navigational hubs that provide a hierarchical view of their area, making it easier to find and discover documentation. |
| 15 | + |
| 16 | +## Architecture & Key Assets |
| 17 | + |
| 18 | +| Landing Page Type | Layout Value | Purpose | |
| 19 | +|-------------------|--------------|---------| |
| 20 | +| Product landing | `product-landing` | Product overview pages with featured links and release notes | |
| 21 | +| Product guides | `product-guides` | Product guides listing organized by categories | |
| 22 | +| Category landing | `category-landing` | Category pages with hierarchical navigation | |
| 23 | +| Table of contents | `toc-landing` | Table of contents pages | |
| 24 | +| Journey landing | `journey-landing` | Guided learning journey pages with track navigation | |
| 25 | +| Discovery landing | `discovery-landing` | Discovery/exploration pages | |
| 26 | +| Home page | (special) | Docs.github.com homepage | |
| 27 | + |
| 28 | +## Setup & Usage |
| 29 | + |
| 30 | +### Running tests |
| 31 | + |
| 32 | +```bash |
| 33 | +npm run test -- src/landings/tests |
| 34 | +``` |
| 35 | + |
| 36 | +## Data & External Dependencies |
| 37 | + |
| 38 | +### Data inputs |
| 39 | +- Page frontmatter: `layout`, `featuredLinks`, `journeyTracks`, etc. |
| 40 | +- Content tree: Used to build TOC and navigation hierarchies |
| 41 | +- Product metadata: Product names, versions, release information |
| 42 | + |
| 43 | +### Dependencies |
| 44 | +- [`@/frame`](../frame/README.md) - Context object, page data, shared components |
| 45 | +- [`@/content-render`](../content-render/README.md) - Renders Liquid in featured link titles |
| 46 | +- [`@/learning-track`](../learning-track/README.md) - Learning track data resolution |
| 47 | +- [`@/journeys`](../journeys/README.md) - Journey track components and data |
| 48 | +- [`@/products`](../products/README.md) - Product metadata and groupings |
| 49 | +- [`@/versions`](../versions/README.md) - Version-aware content filtering |
| 50 | + |
| 51 | +### Data outputs |
| 52 | +- `req.context.featuredLinks` - Resolved featured link data |
| 53 | +- Landing page contexts - Various context objects passed to React components |
| 54 | +- Rendered landing pages - Final HTML output |
| 55 | + |
| 56 | +## Current State & Next Steps |
| 57 | + |
| 58 | +### Known limitations |
| 59 | +- Multiple similar but distinct landing components (could be consolidated) |
| 60 | +- Featured links limited to 4 per category to avoid overly tall columns |
| 61 | +- Bespoke landing pages require custom components rather than data-driven approach |
| 62 | + |
| 63 | +### Areas for improvement |
| 64 | +- Standardize landing page patterns and consolidate overlapping types |
| 65 | +- Make landing pages more data-driven and less code-heavy |
0 commit comments