Skip to content

Commit

Permalink
Some changes based on review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Simran-B committed Dec 12, 2020
1 parent 930d602 commit 92cde0a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
13 changes: 13 additions & 0 deletions content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
- [`showMiniToc`](#showminitoc)
- [`miniTocMaxHeadingLevel`](#minitocmaxheadinglevel)
- [`allowTitleToDifferFromFilename`](#allowtitletodifferfromfilename)
- [`defaultPlatform`](#defaultplatform)
- [Escaping single quotes](#escaping-single-quotes)
- [Autogenerated mini TOCs](#autogenerated-mini-tocs)
- [Versioning](#versioning)
Expand Down Expand Up @@ -172,6 +173,18 @@ featuredLinks:
- Type: `Array`, items are objects `{ href: string, title: string, date: 'YYYY-MM-DD' }`
- Optional.

### `defaultPlatform`

- 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.
- Type: `String`, one of: `mac`, `windows`, `linux`.
- Optional.

Example:

```yaml
defaultPlatform: linux
```

### 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
12 changes: 3 additions & 9 deletions contributing/content-markup-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,15 @@ These instructions are pertinent to Mac users.
{% endmac %}
```

```
{% windows %}
These instructions are pertinent to Windows users.
{% endwindows %}
```

```
{% linux %}
Expand All @@ -96,15 +98,7 @@ These instructions are pertinent to Windows users.
{% endlinux %}
```

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

```
---
title: …
versions: …
defaultPlatform: linux
---
```
You can define a default platform in the frontmatter, see the [content README](../content/README.md#defaultplatform).

## Reusable and variable strings of text

Expand Down

0 comments on commit 92cde0a

Please sign in to comment.