Skip to content

Commit 1bc06d9

Browse files
authored
Expand README for src/landings (#58881)
1 parent 649cf05 commit 1bc06d9

File tree

1 file changed

+61
-3
lines changed

1 file changed

+61
-3
lines changed

src/landings/README.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,65 @@
11
# Landing pages
22

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.
44

5-
## What landing pages are for
5+
## Purpose & Scope
66

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

Comments
 (0)