Skip to content

Commit 99335db

Browse files
authored
Merge pull request github#21254 from github/repo-sync
repo sync
2 parents 6c6dca3 + d524cda commit 99335db

File tree

3 files changed

+47
-11
lines changed

3 files changed

+47
-11
lines changed

contributing/content-markup-reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ You can define a default platform in the frontmatter. For more information, see
129129

130130
## Tool tags
131131

132-
We occasionally need to write documentation for different tools (GitHub UI, GitHub CLI, GitHub Desktop, cURL, Codespaces, VS Code, GitHub Enterprise Importer CLI, GraphQL API). Each tool may require a different set of instructions. We use tool tags to demarcate information for each tool. To modify the list of possible tools, edit [`lib/all-tools.js`](../lib/all-tools.js).
132+
We occasionally need to write documentation for different tools (GitHub UI, GitHub CLI, GitHub Desktop, cURL, Codespaces, VS Code, GitHub Enterprise Importer CLI, GraphQL API). Each tool may require a different set of instructions. We use tool tags to demarcate information for each tool.
133133

134-
To add a new tool, add an entry to the `allTools` object in `lib/all-tools.js` as a key-value pair. The key is the tag you'll use to refer to the tool in the article, the value is how the tool will be identified on the tool picker at the top of the article.
134+
On rare occasions, we will add new tools. Before adding a new tool, read the [tool switcher content model](./tool-switcher.md). To add a new tool, add an entry to the `allTools` object in [`lib/all-tools.js`](../lib/all-tools.js) as a key-value pair. The key is the tag you'll use to refer to the tool in the article, the value is how the tool will be identified on the tool picker at the top of the article.
135+
136+
You can define a default tool in the frontmatter. For more information, see the [content README](../content/README.md#defaulttool).
135137

136138
### Usage
137139

@@ -223,8 +225,6 @@ These instructions are pertinent to javascript users.
223225
{% endjavascript %}
224226
```
225227

226-
You can define a default tool in the frontmatter. For more information, see the [content README](../content/README.md#defaulttool).
227-
228228
## Reusable and variable strings of text
229229

230230
Reusable strings (commonly called content references or conrefs) contain content that’s used in more than one place in our documentation and allow us to change the content in a single location rather than every place the string appears.

contributing/content-model.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,14 @@ Within an article, there is a standard order of content sections. Every article
374374
2. Product callout (conditional)
375375
3. Intro
376376
4. Permissions statement (conditional)
377-
5. Table of contents
378-
6. Conceptual content
379-
7. Referential content
380-
8. Prerequisites
381-
9. Procedural content
382-
10. Troubleshooting
383-
11. Further reading (conditional)
377+
5. Tool switcher (conditional)
378+
6. Table of contents
379+
7. Conceptual content
380+
8. Referential content
381+
9. Prerequisites
382+
10. Procedural content
383+
11. Troubleshooting
384+
12. Further reading (conditional)
384385

385386
Here's what some of these elements look like rendered in an article.
386387

@@ -441,6 +442,10 @@ Occasionally, it's relevant to mention required permissions in conceptual conten
441442
- Article with separate permissions statements for each procedure: [Upgrading your GitHub subscription](https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/upgrading-your-github-subscription)
442443
- Article with single permissions statement for multiple procedures: [Enforcing repository management policies in your enterprise account](https://docs.github.com/en/github/setting-up-and-managing-your-enterprise/enforcing-repository-management-policies-in-your-enterprise-account)
443444

445+
### Tool switcher
446+
447+
Some articles have content that varies depending on what tool someone uses to complete a task, such as the GitHub CLI or GitHub Desktop. For most content, the same conceptual or procedural information will be accurate for multiple tools. However, if the only way to make information clear and accurate is by distinguishing content by tool, use the tool switcher. Do not use the tool switcher just to show examples in different languages. Only use the tool switcher if the tasks or concepts change based on what tool someone uses. For more information on using the tool switcher, see the [tool switcher content model](./tool-switcher.md).
448+
444449
### Table of contents
445450
Tables of contents are automatically generated. For more information see "[Autogenerated mini-TOCs](https://github.com/github/docs/tree/main/content#autogenerated-mini-tocs)."
446451

contributing/tool-switcher.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Tool switcher
2+
3+
In some articles, we write content tailored to different tools (GitHub UI, GitHub CLI, GitHub Desktop, cURL, Codespaces, VS Code, GitHub Enterprise Importer CLI, GraphQL API, etc.) Tools may have different conceptual or procedural information. People can select a tool to see only the content that is relevant to the tool. People can use the tool switcher in two ways when reading the docs.
4+
5+
**Exploring**
6+
For tasks that can be completed with different tools, the tool switcher signals to people that there are multiple ways a task can be done (like using the CLI or Desktop, instead of the UI).
7+
8+
**Getting to the point**
9+
When someone knows how they want to do a task and doesn’t need to see additional options, the tool switcher removes less relevant content, so they can find exactly what they need.
10+
11+
We use tool tags to demarcate information for each tool. On rare occasions, we will add new tools.
12+
13+
## Tool tags
14+
Tool tags are a key value pair. The key is the tag you use to refer to the tool in the article and the value is how the tool will be identified on the tool picker at the top of the article. The existing tools are in [`lib/all-tools.js`](../lib/all-tools.js).
15+
16+
### When to use tool tags
17+
We only use tool tags if an article must have tool-specific information to help people accomplish their tasks. Just because multiple tools exist for a procedure does not mean we should document each tool individually. If the conceptual information behind a task or the procedural steps for accomplishing a task are different, and we want people to be able to accomplish the task with multiple tools, we use tool tags to present the relevant information in an article.
18+
19+
Do not use the tool switcher just to show examples in different languages. Only use the tool switcher if the tasks or concepts described in an article change based on what tool someone uses.
20+
21+
### How to use tool tags
22+
Tool tags are Liquid tags that wrap content specific to a tool. For more information on using tool tags in an article, see the [content markup reference](./content-markup-reference.md#tool-tags).
23+
24+
Only include a maximum of eight different tools in an article. Including more tools causes the tool switcher tabs to overflow with an article's table of contents, which prevents people from using either the tool switcher or table of contents. It is unlikely that you will ever need to include eight separate tools in an article. In general, plan to use as few separate tools as possible in an article.
25+
26+
Tool tags are displayed alphabetically. You can define a default tool for an article in the article's frontmatter. For more information, see the [content README](../content/README.md#defaulttool).
27+
28+
## Adding new tools
29+
If a writer determines that adding a new tool is the only way to accurately document something, they should explain their reasoning in the content planning stage. Whoever reviews content plan should consider if there are any alternative ways to address the documentation need without adding a new tool. If a new tool is the only way to create accurate documentation, the new tool should be added. If there is an alternative content solution that does not add a new tool, that option should be used.
30+
31+
To add a new tool, add an entry to the `allTools` object in [`lib/all-tools.js`](../lib/all-tools.js) as a key-value pair. Add new tools in alphabetical order.

0 commit comments

Comments
 (0)