Skip to content

Commit

Permalink
Add documentation on how to create a sublanding page (github#17467)
Browse files Browse the repository at this point in the history
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
Co-authored-by: Cynthia Rich <crichID@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 28, 2021
1 parent bb6319b commit a390c26
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
50 changes: 50 additions & 0 deletions content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
- [`miniTocMaxHeadingLevel`](#minitocmaxheadinglevel)
- [`allowTitleToDifferFromFilename`](#allowtitletodifferfromfilename)
- [`defaultPlatform`](#defaultplatform)
- [`learningTracks`](#learningTracks)
- [`includeGuides`](#includeGuides)
- [`type`](#type)
- [`topics`](#topics)
- [Escaping single quotes](#escaping-single-quotes)
- [Autogenerated mini TOCs](#autogenerated-mini-tocs)
- [Versioning](#versioning)
Expand All @@ -29,6 +33,7 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
- [Whitespace control](#whitespace-control)
- [Links and image paths](#links-and-image-paths)
- [Preventing transformations](#preventing-transformations)
- [Creating new sublanding pages](#creating-new-sublanding-pages)

## Frontmatter

Expand Down Expand Up @@ -186,6 +191,39 @@ Example:
defaultPlatform: linux
```

### `learningTracks`
- Purpose: Render a list of learning tracks on a product's sub-landing page.
- type: `String`. This should reference learning tracks' names defined in [`data/learning-tracks/*.yml`](../data/learning-tracks/README.md).
- Optional

**Note: the first learning track is by-default the featured track.*

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

Example:

```yml
includeGuides:
- /actions/guides/about-continuous-integration
- /actions/guides/setting-up-continuous-integration-using-workflow-templates
- /actions/guides/building-and-testing-nodejs
- /actions/guides/building-and-testing-powershell
```

### `type`
- Purpose: Indicate the type of article.
- Type: `String`, one of the `overview`, `quick_start`, `tutorial`, `how_to`, `reference`.
- Optional.

### `topics`
- Purpose: Indicate the topics covered by the article.
- Type: `String`
- Optional.


### Escaping single quotes

If you see two single quotes in a row (`''`) in YML frontmatter where you might expect to see one (`'`), this is the YML-preferred way to escape a single quote. From [the YAML spec](https://yaml.org/spec/history/2001-12-10.html):
Expand Down Expand Up @@ -274,3 +312,15 @@ Sometimes you want to link to a Dotcom-only article in Enterprise content and yo
```

Sometimes the canonical home of content moves outside the docs site. None of the links included in [`lib/redirects/external-sites.json`](/lib/redirects/external-sites.json) get rewritten. See [`contributing/redirects.md`](/contributing/redirects.md) for more info about this type of redirect.


### Creating new sublanding pages

To create a sublanding page (e.g. [Actions' Guide page](https://docs.github.com/en/actions/guides)), create or modify an existing markdown file with these specific frontmatter values:

1. Use the sublanding page template by referencing it `layout: product-sublanding`
2. (optional) Include the learning tracks in [`learningTracks`](#learningTracks)
3. (optional) Define which articles to include with [`includeGuides`](#includeGuides).

If using learning tracks, they need to be defined in [`data/learning-tracks/*.yml`](../data/learning-tracks/README.md).
If using `includeGuides`, make sure each of the articles in this list has [`topics`](#topics) and [`type`](#type) in its frontmatter.
4 changes: 4 additions & 0 deletions data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ Webhook payload JSON files are used in the [`webhook events docs`](../content/de
## ui.yml

`ui.yml` contains localized strings used in HTML layouts.

## Learning Tracks

Learning tracks are a collection of articles that help you master a particular subject. See [learning-tracks/README.md](learning-tracks/README.md).
3 changes: 3 additions & 0 deletions data/learning-tracks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Learning Tracks (aka Learning Paths)

Learning tracks are a collection of articles that help you master a particular subject. Learning tracks are defined on a per-product basis.

0 comments on commit a390c26

Please sign in to comment.