Skip to content

Commit 92cde0a

Browse files
committed
Some changes based on review feedback
1 parent 930d602 commit 92cde0a

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

content/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
2020
- [`showMiniToc`](#showminitoc)
2121
- [`miniTocMaxHeadingLevel`](#minitocmaxheadinglevel)
2222
- [`allowTitleToDifferFromFilename`](#allowtitletodifferfromfilename)
23+
- [`defaultPlatform`](#defaultplatform)
2324
- [Escaping single quotes](#escaping-single-quotes)
2425
- [Autogenerated mini TOCs](#autogenerated-mini-tocs)
2526
- [Versioning](#versioning)
@@ -172,6 +173,18 @@ featuredLinks:
172173
- Type: `Array`, items are objects `{ href: string, title: string, date: 'YYYY-MM-DD' }`
173174
- Optional.
174175

176+
### `defaultPlatform`
177+
178+
- Purpose: Override the initial platform selection for a page. If this frontmatter is omitted, then the platform-specific content matching the reader's operating system is shown by default. This behavior can be changed for individual pages, for which a manual selection is more reasonable. For example, most GitHub Actions runners use Linux and their operating system is independent of the reader's operating system.
179+
- Type: `String`, one of: `mac`, `windows`, `linux`.
180+
- Optional.
181+
182+
Example:
183+
184+
```yaml
185+
defaultPlatform: linux
186+
```
187+
175188
### Escaping single quotes
176189

177190
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):

contributing/content-markup-reference.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ These instructions are pertinent to Mac users.
8181
8282
{% endmac %}
8383
```
84+
8485
```
8586
{% windows %}
8687
8788
These instructions are pertinent to Windows users.
8889
8990
{% endwindows %}
9091
```
92+
9193
```
9294
{% linux %}
9395
@@ -96,15 +98,7 @@ These instructions are pertinent to Windows users.
9698
{% endlinux %}
9799
```
98100

99-
The platform-specific content matching the reader's operating system shows by default. You can override this behavior for individual Markdown files with the `defaultPlatform` frontmatter (such as for pages about GitHub Actions runners, which mostly use Linux):
100-
101-
```
102-
---
103-
title: …
104-
versions: …
105-
defaultPlatform: linux
106-
---
107-
```
101+
You can define a default platform in the frontmatter, see the [content README](../content/README.md#defaultplatform).
108102

109103
## Reusable and variable strings of text
110104

0 commit comments

Comments
 (0)