Skip to content

Commit 0907034

Browse files
committed
update internal docs
1 parent 277d298 commit 0907034

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

content/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ defaultPlatform: linux
207207
- type: `String`. This should reference learning tracks' names defined in [`data/learning-tracks/*.yml`](../data/learning-tracks/README.md).
208208
- Optional
209209

210-
**Note: the first learning track is by-default the featured track.*
210+
**Note: the featured track is set by a specific property in the learning tracks YAML. See that [README](../data/learning-tracks/README.md) for details.*
211211

212212
### `includeGuides`
213213
- Purpose: Render a list of articles, filterable by `type` and `topics`. Only applicable when used with `layout: product-sublanding`.

data/learning-tracks/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
# Learning Tracks (aka Learning Paths)
22

3-
Learning tracks are a collection of articles that help you master a particular subject. Learning tracks are defined on a per-product basis.
3+
Learning tracks are a collection of articles that help you master a particular subject. Learning tracks are defined on a per-product basis. For example, see https://docs.github.com/en/actions/guides.
4+
5+
Learning track data for a product is defined in two places:
6+
7+
1. A simple array of learning track names is defined in the product sublanding index page frontmatter.
8+
9+
For example, in `content/actions/guides/index.md`:
10+
```
11+
learningTracks:
12+
- getting_started
13+
- continuous_integration
14+
- continuous_deployment
15+
- deploy_to_the_cloud
16+
- hosting_your_own_runners
17+
- create_actions
18+
```
19+
20+
2. Additional data for each track is defined in a YAML file named for the **product** in the `data` directory.
21+
22+
For example, in `data/learning-tracks/actions.yml`, each of the items from the list in #1 is represented with additional data such as `title`, `description`, and a list of `guides` links.
23+
24+
One, and only one, learning track in this YAML must be designated as a "featured" learning track via `featured_track: true`, which will set it to appear at the top of the product sublanding page. Schema validation will fail if this property is missing.
25+
26+
Versioning for learning tracks happens at page render time. The code lives in [`lib/learning-tracks.js`](lib/learning-tracks.js), which is called by `page.render()`. The processed learning tracks are then rendered by `layouts/product-sublanding.html`.
27+
28+
The schema for validating the learning track YAML lives in [`tests/helpers/schemas/learning-tracks-schema.js`](tests/helpers/schemas/learning-tracks-schema.js) and is exercised by [`tests/content/lint-files.js`](tests/content/lint-files.js).

0 commit comments

Comments
 (0)