1
0
mirror of synced 2025-12-25 02:17:36 -05:00

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
committed by GitHub
parent 3c3b5b9cb3
commit 0d484f9d48
3 changed files with 10 additions and 1 deletions

View File

@@ -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

View File

@@ -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

View File

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