зеркало из https://github.com/github/docs.git
YAGNI: Remove support for {% all %}
This commit is contained in:
Родитель
b08584e5be
Коммит
3f8f75e116
|
@ -38,10 +38,10 @@ For information on when to use callout tags, see the [style guide](content-style
|
|||
|
||||
To render syntax highlighting in command line instructions, we use triple backticks followed by the term `shell`.
|
||||
|
||||
### Usage
|
||||
|
||||
```shell
|
||||
git init <em>YOUR_REPO</em>
|
||||
### Usage
|
||||
|
||||
```shell
|
||||
git init <em>YOUR_REPO</em>
|
||||
```
|
||||
|
||||
This syntax highlighting renders light text on a dark background, and should be reserved for command line instructions.
|
||||
|
@ -93,13 +93,6 @@ These instructions are pertinent to Windows users.
|
|||
|
||||
{% endlinux %}
|
||||
```
|
||||
```
|
||||
{% all %}
|
||||
|
||||
Though rare, these instructions are pertinent to any other operating system.
|
||||
|
||||
{% endall %}
|
||||
```
|
||||
|
||||
## Reusable and variable strings of text
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
<a href="#" class="UnderlineNav-item platform-switcher" data-platform="mac">Mac</a>
|
||||
<a href="#" class="UnderlineNav-item platform-switcher" data-platform="windows">Windows</a>
|
||||
<a href="#" class="UnderlineNav-item platform-switcher" data-platform="linux">Linux</a>
|
||||
<a href="#" class="UnderlineNav-item platform-switcher" data-platform="all">All</a>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
|
|
@ -104,7 +104,7 @@ const schema = {
|
|||
// Platform-specific content preference
|
||||
defaultPlatform: {
|
||||
type: 'string',
|
||||
enum: ['mac', 'windows', 'linux'] // TODO: add 'all'?
|
||||
enum: ['mac', 'windows', 'linux']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ class Page {
|
|||
const $ = cheerio.load(html)
|
||||
|
||||
// set a flag so layout knows whether to render a mac/windows/linux switcher element
|
||||
this.includesPlatformSpecificContent = $('[class^="platform-"], .mac, .windows, .linux, .all').length > 0
|
||||
this.includesPlatformSpecificContent = $('[class^="platform-"], .mac, .windows, .linux').length > 0
|
||||
|
||||
// rewrite asset paths to s3 if it's a dotcom article on any GHE version
|
||||
// or if it's an enterprise article on any GHE version EXCEPT latest version
|
||||
|
|
Загрузка…
Ссылка в новой задаче