Add JavaScript to tool switcher (#29780)

add javascript to tool switcher
This commit is contained in:
Sarah Edwards 2022-08-10 12:53:48 -07:00 коммит произвёл GitHub
Родитель 3c3b5b9cb3
Коммит 0d484f9d48
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -228,7 +228,7 @@ defaultPlatform: linux
### `defaultTool`
- Purpose: Override the initial tool selection for a page, where tool refers to the application the reader is using to work with GitHub (such as GitHub.com's web UI, the GitHub CLI, or GitHub Desktop) or the GitHub APIs (such as cURL or the GitHub CLI). For more information about the tool selector, see [Markup reference for GitHub Docs](../contributing/content-markup-reference.md#tool-tags). If this frontmatter is omitted, then the tool-specific content matching the GitHub web UI is shown by default. If a user has indicated a tool preference (by clicking on a tool tab), then the user's preference will be applied instead of the default value.
- Type: `String`, one of: `webui`, `cli`, `desktop`, `curl`, `codespaces`, `vscode`, `importer_cli`, `graphql`, `powershell`, `bash`.
- Type: `String`, one of: `webui`, `cli`, `desktop`, `curl`, `codespaces`, `vscode`, `importer_cli`, `graphql`, `powershell`, `bash`, `javascript`.
- Optional.
```yaml

Просмотреть файл

@ -212,6 +212,14 @@ These instructions are pertinent to Bash shell commands.
{% endbash %}
```
```
{% javascript %}
These instructions are pertinent to javascript users.
{% endjavascript %}
```
You can define a default tool in the frontmatter. For more information, see the [content README](../content/README.md#defaulttool).
## Reusable and variable strings of text

Просмотреть файл

@ -10,4 +10,5 @@ export const allTools = {
powershell: 'PowerShell',
vscode: 'Visual Studio Code',
webui: 'Web browser',
javascript: 'JavaScript',
}