зеркало из https://github.com/github/docs.git
Some changes based on review feedback
This commit is contained in:
Родитель
930d602c51
Коммит
92cde0a07f
|
@ -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)
|
||||
|
@ -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):
|
||||
|
|
|
@ -81,6 +81,7 @@ These instructions are pertinent to Mac users.
|
|||
|
||||
{% endmac %}
|
||||
```
|
||||
|
||||
```
|
||||
{% windows %}
|
||||
|
||||
|
@ -88,6 +89,7 @@ These instructions are pertinent to Windows users.
|
|||
|
||||
{% endwindows %}
|
||||
```
|
||||
|
||||
```
|
||||
{% linux %}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче