Are you sure you want to delete this access key?
Welcome to the content style guide for GitHub Docs.
These guidelines are specific to GitHub’s documentation. For general style questions or guidance on topics not covered here, see the GitHub Brand Guide first, then the Microsoft Style Guide. For markup specific to source content on docs.github.com, see our markup reference guide.
Callouts highlight important information that customers need to know. We use standard formatting and colors for different types of callouts across doc sets.
Use callouts sparingly for high-value information - do not include general information, permissions, or prerequisites in callouts. Do not include more than two bullet points in a callout.
There are three types of in-content callouts: notes, warnings, and danger notices.
Each callout starts with text indicating the type of callout (e.g. Warning:) to orient the reader (whether accessing the site visually or with a screen reader) and helps every user gauge the importance and necessity of the information in the callout.
Notes are rendered in blue {% note %}
tags.
**Note:**
.Warnings and danger notices are rendered in red {% warning %}
tags.
**Warning:**
.**Danger:**
.For more information on formatting callouts, see “Callouts” in the markup reference guide.
Keep lines in code samples to about 60 characters, to avoid requiring readers to scroll horizontally in the code block. Locate explanatory text before the code block, rather than using comments inside the code block.
Within code blocks:
$
before the command itself if you’re showing the command’s output in the same block.Use inline code blocks to refer to short command names.
ghe-cluster-status
command.Use command blocks for longer or more complex commands.
Use: Enable maintenance mode according to your scheduled window by connecting to the administrative shell of any cluster node and running:
ghe-cluster-maintenance -s
Avoid inline links in command names.
When code examples refer to a larger file, show the relevant section of the file, so that users understand how to edit their own code in context.
on:
schedule:
- cron: "40 19 * * *"
schedule:
- cron: "40 19 * * *"
In YAML examples, such as actions and workflow files, use two spaces to indent lines within nested lists and block sequences.
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
Workflow runs are delayed when too many workflows run at once. Since many users copy code from the GitHub docs, we should use examples that guide users away from congested times.
Use H3 for headers, and H4 for subheaders. When referring to headers, surround the header name with quotation marks.
To orient readers and help them understand if the section is relevant to them, include introductory content after a header - don’t locate a subheader directly following a header.
Every image must include an alt attribute that provides a complete description of the image for the user. For more information, see “Images, image maps, and multimedia” in Microsoft’s Style Guide.
Be descriptive when naming image files: include the name, action, and UI element in the filename. Mirror product language. Use kebab case. If replacing an image, use the exact filename.
data-pack-purchase-button.png
purchase_button.png
When you take a screenshot, avoid overly wide images. If you're trying to bring attention to a button, don't take a shot of the entire page. Focus on the area around the button instead and crop near the focal point of the image. Leave enough of a margin around the focal point so that some other elements of the page are visible, helping the viewer find the area of the screenshot when looking at the user interface.
Do not include your username or avatar in any images. If a screenshot must include a username or avatar, use the Inspect function in your browser to add the Octocat's username or avatar instead.
As home to the largest developer community in the world, GitHub is committed to promoting diversity and inclusion in every aspect of what we do. It is critical that all of our documentation is inclusive and respectful of our audience, which consists of people in widely varying circumstances from all over the planet. When we write our documentation, we use words that are inclusive, anti-racist, and accessible.
Individual words might be small, but together they can create community, belonging, and equity. Be empathetic in all word and style choices. Be accurate when referring to people and communities.
Use | Avoid |
---|---|
Allowlist | Whitelist |
Denylist | Blacklist |
Default/Main branch | Master branch |
GitHub Brand Guide:
The Microsoft Style Guide offers resources on bias-free communication, accessibility terms, and writing for all abilities:
More resources for learning about inclusive and accessible language and style:
For plain text, use linebreaks to separate paragraphs in the source (two consecutive linebreaks), rather than to create visual space in the source. Avoid unneeded linebreaks, especially in lists.
Introduce links consistently using a standard format that clearly indicates where we’re linking: "For more information, see X [or "Page/article title"] in the X documentation." Do not include quotation marks within a hyperlink.
Links should be meaningful and provide high value to the user’s journey - link out carefully. Move links that are helpful but not necessary to an article’s further reading section. Do not repeat the same link more than once in the same article or under the same H3 header.
For accessibility and readability, avoid inline or midsentence links.
For more information on links and accessibility, see “Links” in the Readability Guidelines project.
When linking to an external site, choose the most useful resource for the context of the link - you can link to a whole site if it's a general reference or to a specific page if that would be more helpful.
It's not necessary to link to an external product’s website when we mention an external product.
For general guidelines, see “Lists” in GitHub’s Brand Guide.
Capitalize the first letter in each line of a list. Use periods at the end of lines in a list only if the line contains a complete sentence.
When writing a list of items that consist of primary and secondary text, such as a term
and its definition, use a colon delimiter. The secondary text should be capitalized as if it was the beginning of the line. For example:
foo
: Something that provides bar.bar
: Something provided by foo.Formatting unordered lists:
When introducing a list, avoid phrasing like “the following” or “these”, terms which are difficult to localize. Instead, be descriptive, yet general enough to allow a list to scale or change without having to update the description.
Procedures give readers a set of sequential steps to follow to complete a task. Always use numbered lists for procedures. Give readers all of the prerequisites or conceptual information they’ll need to complete the task before the procedure, rather than including it within a specific step.
Each step must include an action. You can also choose to include whether a step is optional, explain the reason or result of the step, and orient the reader by describing the location of the action, before guiding them to complete the action.
Use a consistent order to present information within each step.
Use: Optionally, to [REASON], in [LOCATION], take [ACTION].
Examples:
Use full product names. Do not abbreviate or shorten product names unless directly reproducing content from the product (e.g. UI copy or API responses).
Use product name variables to render product names - do not write product names in plain text. This makes product name changes easier to implement across the site and avoids typos in our product names. For more information about product name variables, see “Reusables and variables” in this document and the data directory of the github/docs repository.
Product names are always singular.
Take care to distinguish between product names and product elements. For more information, see “Terminology” in GitHub’s Brand Guide.
Product | Element |
---|---|
GitHub Actions | an action |
GitHub Packages | a package |
GitHub Pages | a GitHub Pages site |
Follow standard American English punctuation rules. For more guidance, see “Punctuation” in GitHub’s Brand Guide and “Punctuation” in the Microsoft Style Guide.
Use reusable strings for individual nouns (e.g. product names) or for complete sentences or paragraphs. Sentence fragments and phrases should not be contained in reusable strings as they can cause problems when content is localized. For more information, see the data directory in the github/docs repository and the “Product names” section of this document.
A table’s contents should be clear from the preceding content - avoid unneeded descriptions. If you must describe a table, use complete sentences closed with a period.
Use quotation marks around article titles, whether the article is hosted on GitHub Docs or elsewhere. Do not include quotation marks around the names of external sites.
For further guidance, see “Formatting titles” in Microsoft’s Style Guide.
Use bold to describe UI elements that can be interacted with.
Use code formatting for branch names.
main
<username>.github.io
Format button names in bold and, whenever possible, omit the word “button.” To describe using a button, write “click”, not push or press.
Format checkbox names in bold and omit the word “checkbox.” To describe choosing or clearing a checkbox, use “select” or “deselect.”
Format drop-down menus in regular text and format clickable items within a menu in bold. Select drop-down menus (regardless of whether the menu name is a word or an octicon), and click their menu items.
Use capital letters to indicate text that changes in the user interface or that the user needs to supply in a command or code snippet.
Describe a user interface element’s location with standard terms.
Format radio button labels in bold and omit the words “radio button” or any other descriptor. To describe using a radio button, write "select."
Use a standard format to refer to repositories. Link to repositories when helpful.
When referencing text in the user interface, reproduce the text exactly. Use quotation marks to surround UI text that cannot be interacted with.
GitHub Brand Guide:
Use clear, simple language that’s approachable and accessible for a wide range of readers. For more information, see “Voice” in GitHub’s Brand Guide. To learn more about writing approachable content, see “Microsoft's brand voice: Above all, simple and human and “Top 10 tips for Microsoft style and voice.”
For general guidance and GitHub-specific terms, see “Terminology” and “Words that can be tricky” in GitHub’s Brand Guide. For more detailed guidance, see the “A-Z word list” in Microsoft’s style guide.
Spell out words except when referring to a word that’s explicitly shortened in the product itself.
Do not use symbols or octicons that aren’t used in GitHub’s user interface.
To avoid ambiguity and confusion, do not use product names as adjectives to describe accounts in any of our products. Instead, clarify the account type and choose clearer phrasing that avoids conflating accounts and products. When talking about accounts, only refer to the product name when needed to disambiguate between products.
Spell out acronyms the first time they’re used in an article, except in titles or headers.
Use "apps" or "applications" in general content.
Use "Apps" when referring to specific apps or types of apps.
GitHub Apps is always capitalized, because it’s a feature name.
See the “Inclusive language” section of this guide.
Avoid ending a sentence with a preposition unless the rewritten sentence would sound awkward or too formal.
See the “Product names” section of this guide.
Use | Avoid |
---|---|
person | user, customer |
terminal | shell |
username | login |
sign in | log in, login |
sign up | signup |
recommended limit | soft limit |
on GitHub | on a remote repository |
press (a key) | hit, tap |
type (in the user interface) | enter (in the user interface) |
enter (in the command line) | type (in the command line) |
Avoid stacked modifiers (strings of nouns), which can lead to incorrect translations because translations may not be able to tell which word is modifying the other. You can rephrase the string of nouns using a preposition. If using a stacked modifier is essential, make sure the background information and context are clear so that readers and the translator can understand what is being modified.
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?