Skip to content

Commit 0d484f9

Browse files
authored
Add JavaScript to tool switcher (github#29780)
add javascript to tool switcher
1 parent 3c3b5b9 commit 0d484f9

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

content/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ defaultPlatform: linux
228228
### `defaultTool`
229229

230230
- 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.
231-
- Type: `String`, one of: `webui`, `cli`, `desktop`, `curl`, `codespaces`, `vscode`, `importer_cli`, `graphql`, `powershell`, `bash`.
231+
- Type: `String`, one of: `webui`, `cli`, `desktop`, `curl`, `codespaces`, `vscode`, `importer_cli`, `graphql`, `powershell`, `bash`, `javascript`.
232232
- Optional.
233233

234234
```yaml

contributing/content-markup-reference.md

+8
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ These instructions are pertinent to Bash shell commands.
212212
{% endbash %}
213213
```
214214

215+
```
216+
{% javascript %}
217+
218+
These instructions are pertinent to javascript users.
219+
220+
{% endjavascript %}
221+
```
222+
215223
You can define a default tool in the frontmatter. For more information, see the [content README](../content/README.md#defaulttool).
216224

217225
## Reusable and variable strings of text

lib/all-tools.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export const allTools = {
1010
powershell: 'PowerShell',
1111
vscode: 'Visual Studio Code',
1212
webui: 'Web browser',
13+
javascript: 'JavaScript',
1314
}

0 commit comments

Comments
 (0)