1
0
mirror of synced 2025-12-19 09:57:42 -05:00

fix incorrect code language case

This commit is contained in:
Rachael Sewell
2023-09-25 11:21:53 -07:00
parent e3f499b90c
commit b8bd4630f6
21 changed files with 64 additions and 64 deletions

View File

@@ -42,7 +42,7 @@ In your new `hello-world-docker-action` directory, create a new `Dockerfile` fil
**Dockerfile** **Dockerfile**
```Dockerfile copy ```dockerfile copy
# Container image that runs your code # Container image that runs your code
FROM alpine:3.10 FROM alpine:3.10

View File

@@ -113,7 +113,7 @@ You can create your own runner image that meets your requirements. Your runner i
You can use the following example Dockerfile to start creating your own runner image. You can use the following example Dockerfile to start creating your own runner image.
```Dockerfile copy ```dockerfile copy
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 as build FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 as build
# Replace value with the latest runner release version # Replace value with the latest runner release version

View File

@@ -83,7 +83,7 @@ The following example uses four instructions:
`RUN` updates package lists and runs a script. You can also use a `RUN` instruction to install software, as shown by the commented out instructions. To run multiple commands, use `&&` to combine the commands into a single `RUN` statement. `RUN` updates package lists and runs a script. You can also use a `RUN` instruction to install software, as shown by the commented out instructions. To run multiple commands, use `&&` to combine the commands into a single `RUN` statement.
```Dockerfile copy ```dockerfile copy
ARG VARIANT="16-buster" ARG VARIANT="16-buster"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

View File

@@ -90,13 +90,13 @@ This type of URL is useful, for instance, in a README for your repository as it
1. Get the URL to the codespace creation page, or the "Resume codespace" page, as described in the previous sections. 1. Get the URL to the codespace creation page, or the "Resume codespace" page, as described in the previous sections.
1. Add the following Markdown to, for example, the `README.md` file of your repository: 1. Add the following Markdown to, for example, the `README.md` file of your repository:
```Markdown copy ```markdown copy
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](URL) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](URL)
``` ```
For example: For example:
```Markdown ```markdown
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/github/docs) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/github/docs)
``` ```

View File

@@ -99,7 +99,7 @@ For multi-line text, you can use the pipe operator.
#### Example of `markdown` #### Example of `markdown`
```YAML copy ```yaml copy
body: body:
- type: markdown - type: markdown
attributes: attributes:
@@ -136,7 +136,7 @@ You can use a `textarea` element to add a multi-line text field to your form. Co
#### Example of `textarea` #### Example of `textarea`
```YAML copy ```yaml copy
body: body:
- type: textarea - type: textarea
id: repro id: repro
@@ -178,7 +178,7 @@ You can use an `input` element to add a single-line text field to your form.
#### Example of `input` #### Example of `input`
```YAML copy ```yaml copy
body: body:
- type: input - type: input
id: prevalence id: prevalence
@@ -216,7 +216,7 @@ You can use a `dropdown` element to add a dropdown menu in your form.
#### Example of `dropdown` #### Example of `dropdown`
```YAML copy ```yaml copy
body: body:
- type: dropdown - type: dropdown
id: download id: download
@@ -259,7 +259,7 @@ You can use the `checkboxes` element to add a set of checkboxes to your form.
#### Example of `checkboxes` #### Example of `checkboxes`
```YAML copy ```yaml copy
body: body:
- type: checkboxes - type: checkboxes
id: operating-systems id: operating-systems

View File

@@ -31,7 +31,7 @@ This example YAML configuration file defines an issue form using several inputs
All issue form configuration files must begin with `name`, `description`, and `body` key-value pairs. All issue form configuration files must begin with `name`, `description`, and `body` key-value pairs.
```YAML copy ```yaml copy
name: name:
description: description:
body: body:

View File

@@ -43,7 +43,7 @@ If you're using `nodenv`, see the [`nodenv` docs](https://github.com/nodenv/node
Once you've installed Node.js (which includes the popular `npm` package manager), open your terminal and run the following commands. Once you've installed Node.js (which includes the popular `npm` package manager), open your terminal and run the following commands.
```sh ```shell
git clone https://github.com/github/docs git clone https://github.com/github/docs
cd docs cd docs
npm ci npm ci

View File

@@ -136,7 +136,7 @@ Add a link to the article with a video's transcript in the description of the vi
In any content with an embedded video, add a `product_video_transcript` property below the `product_video` property in the YAML frontmatter. The value of `product_video_transcript` is a link to the transcript article in the `video-transcripts` directory. In any content with an embedded video, add a `product_video_transcript` property below the `product_video` property in the YAML frontmatter. The value of `product_video_transcript` is a link to the transcript article in the `video-transcripts` directory.
```YAML ```yaml
title: Example product landing page title: Example product landing page
product_video: 'https://www.youtube-nocookie.com/embed/URL' product_video: 'https://www.youtube-nocookie.com/embed/URL'
product_video_transcript: /content/video-transcripts/TRANSCRIPT-TITLE product_video_transcript: /content/video-transcripts/TRANSCRIPT-TITLE

View File

@@ -24,7 +24,7 @@ This example YAML configuration file defines a general discussion category form.
The configuration file for a discussion category form must contain a `body` key, and the `body` must contain at least 1 non-Markdown field. The configuration file for a discussion category form must contain a `body` key, and the `body` must contain at least 1 non-Markdown field.
```YAML copy ```yaml copy
body: body:
- type: input - type: input
id: suggestion id: suggestion

View File

@@ -61,7 +61,7 @@ By using the HTML `<picture>` element with the `prefers-color-scheme` media feat
1. Copy and paste the following markup into your {% ifversion ghae %}`about-me.md`{% else %}`README.md`{% endif %} file. 1. Copy and paste the following markup into your {% ifversion ghae %}`about-me.md`{% else %}`README.md`{% endif %} file.
```HTML copy ```html copy
<picture> <picture>
<source media="(prefers-color-scheme: dark)" srcset="YOUR-DARKMODE-IMAGE"> <source media="(prefers-color-scheme: dark)" srcset="YOUR-DARKMODE-IMAGE">
<source media="(prefers-color-scheme: light)" srcset="YOUR-LIGHTMODE-IMAGE"> <source media="(prefers-color-scheme: light)" srcset="YOUR-LIGHTMODE-IMAGE">
@@ -94,7 +94,7 @@ You can use Markdown tables to organize information. Here, you'll use a table to
1. Return to the **Edit {% ifversion ghae %}new {% endif %}file** tab. 1. Return to the **Edit {% ifversion ghae %}new {% endif %}file** tab.
1. To introduce yourself, two lines below the `</picture>` tag, add an `## About me` header and a short paragraph about yourself, like the following. 1. To introduce yourself, two lines below the `</picture>` tag, add an `## About me` header and a short paragraph about yourself, like the following.
```Markdown ```markdown
## About me ## About me
Hi, I'm Mona. You might recognize me as {% data variables.product.prodname_dotcom %}'s mascot. Hi, I'm Mona. You might recognize me as {% data variables.product.prodname_dotcom %}'s mascot.
@@ -102,7 +102,7 @@ You can use Markdown tables to organize information. Here, you'll use a table to
1. Two lines below this paragraph, insert a table by copying and pasting the following markup. 1. Two lines below this paragraph, insert a table by copying and pasting the following markup.
```Markdown copy ```markdown copy
| Rank | THING-TO-RANK | | Rank | THING-TO-RANK |
|-----:|---------------| |-----:|---------------|
| 1| | | 1| |
@@ -117,7 +117,7 @@ For more information, see "[AUTOTITLE](/get-started/writing-on-github/working-wi
### Example of a table ### Example of a table
```Markdown ```markdown
## About me ## About me
Hi, I'm Mona. You might recognize me as {% data variables.product.prodname_dotcom %}'s mascot. Hi, I'm Mona. You might recognize me as {% data variables.product.prodname_dotcom %}'s mascot.
@@ -139,7 +139,7 @@ To keep your content tidy, you can use the `<details>` tag to create an expandib
1. To create a collapsed section for the table you created, wrap your table in `<details>` tags like in the following example. 1. To create a collapsed section for the table you created, wrap your table in `<details>` tags like in the following example.
```HTML copy ```html copy
<details> <details>
<summary>My top THINGS-TO-RANK</summary> <summary>My top THINGS-TO-RANK</summary>
@@ -151,7 +151,7 @@ To keep your content tidy, you can use the `<details>` tag to create an expandib
1. Between the `<summary>` tags, replace `THINGS-TO-RANK` with whatever you ranked in your table. 1. Between the `<summary>` tags, replace `THINGS-TO-RANK` with whatever you ranked in your table.
1. Optionally, to make the section display as open by default, add the `open` attribute to the `<details>` tag. 1. Optionally, to make the section display as open by default, add the `open` attribute to the `<details>` tag.
```HTML ```html
<details open> <details open>
``` ```
@@ -159,7 +159,7 @@ To keep your content tidy, you can use the `<details>` tag to create an expandib
### Example of a collapsed section ### Example of a collapsed section
```HTML ```html
<details> <details>
<summary>My top languages</summary> <summary>My top languages</summary>
@@ -182,13 +182,13 @@ Markdown has many other options for formatting your content. Here, you'll add a
1. At the bottom of your file, two lines below the `</details>` tag, add a horizontal rule by typing three or more dashes. 1. At the bottom of your file, two lines below the `</details>` tag, add a horizontal rule by typing three or more dashes.
```Markdown ```markdown
--- ---
``` ```
1. Below the `---` line, add a quote by typing markup like the following. 1. Below the `---` line, add a quote by typing markup like the following.
```Markdown ```markdown
> QUOTE > QUOTE
``` ```
@@ -197,7 +197,7 @@ Markdown has many other options for formatting your content. Here, you'll add a
### Example of a quote ### Example of a quote
```Markdown ```markdown
--- ---
> If we pull together and commit ourselves, then we can push through anything. > If we pull together and commit ourselves, then we can push through anything.

View File

@@ -30,13 +30,13 @@ Webhook forwarding in the {% data variables.product.prodname_cli %} only works w
1. To install the {% data variables.product.prodname_cli %} extension to enable webhook forwarding, use the `extension install` subcommand. 1. To install the {% data variables.product.prodname_cli %} extension to enable webhook forwarding, use the `extension install` subcommand.
```sh ```shell
gh extension install cli/gh-webhook gh extension install cli/gh-webhook
``` ```
1. If you want to forward organization webhooks, add the `admin:org_hook` scope to your {% data variables.product.prodname_cli %} login so you have the required permissions. 1. If you want to forward organization webhooks, add the `admin:org_hook` scope to your {% data variables.product.prodname_cli %} login so you have the required permissions.
```sh ```shell
gh auth refresh --scopes admin:org_hook gh auth refresh --scopes admin:org_hook
``` ```
@@ -44,7 +44,7 @@ Webhook forwarding in the {% data variables.product.prodname_cli %} only works w
1. To set up webhooks to be delivered to your application, run the `webhook forward` subcommand. Replace `REPOSITORY` with the name of your repository. For example, `monalisa/octocat`. Replace `EVENTS` with a comma-separated list of the events that you want to receive. For example, `issues,pull_request`. Replace `URL` with the local URL where your application expects to receive webhooks. For example, `"http://localhost:3000/webhook"`. To listen for organization webhooks instead of repository webhooks, replace the `--repo` flag with the `--org` flag. For example `--org="octo-org"`. 1. To set up webhooks to be delivered to your application, run the `webhook forward` subcommand. Replace `REPOSITORY` with the name of your repository. For example, `monalisa/octocat`. Replace `EVENTS` with a comma-separated list of the events that you want to receive. For example, `issues,pull_request`. Replace `URL` with the local URL where your application expects to receive webhooks. For example, `"http://localhost:3000/webhook"`. To listen for organization webhooks instead of repository webhooks, replace the `--repo` flag with the `--org` flag. For example `--org="octo-org"`.
```sh ```shell
gh webhook forward --repo=REPOSITORY --events=EVENTS --url=URL gh webhook forward --repo=REPOSITORY --events=EVENTS --url=URL
``` ```

View File

@@ -12,7 +12,7 @@ You'll need Node.js to run the site. Check the version in `package.json`. To ins
Once you've installed Node.js (which includes the popular `npm` package manager), open Terminal and run the following: Once you've installed Node.js (which includes the popular `npm` package manager), open Terminal and run the following:
```sh ```shell
git clone https://github.com/github/docs git clone https://github.com/github/docs
cd docs cd docs
npm ci npm ci

View File

@@ -16,13 +16,13 @@ When updating to a new Node.js version, consider the following files:
If you're using macOS, run this command to get the latest: If you're using macOS, run this command to get the latest:
```sh ```shell
brew upgrade nodenv node-build brew upgrade nodenv node-build
``` ```
If you see a warning like this one, run the suggested command: If you see a warning like this one, run the suggested command:
```sh ```shell
# You should change the ownership of these directories to your user. # You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/sbin sudo chown -R $(whoami) /usr/local/sbin
``` ```
@@ -31,19 +31,19 @@ If you're using another operating system, or did not use Homebrew to install nod
To install Node.js and make it your default version, run this command: To install Node.js and make it your default version, run this command:
```sh ```shell
# Set VERSION= based on package.json#engines # Set VERSION= based on package.json#engines
nodenv install $VERSION && nodenv global $VERSION nodenv install $VERSION && nodenv global $VERSION
``` ```
You may sometimes see a warning when running npm scripts with nodenv: You may sometimes see a warning when running npm scripts with nodenv:
```sh ```shell
npm WARN lifecycle The node binary used for scripts is [...] but npm is using [...] npm WARN lifecycle The node binary used for scripts is [...] but npm is using [...]
``` ```
This is due to nodenv's overriding behavior. To silence this harmless warning, the [nodenv docs](https://github.com/nodenv/nodenv/wiki/FAQ#npm-warning-about-mismatched-binaries) recommend running the following command from any directory: This is due to nodenv's overriding behavior. To silence this harmless warning, the [nodenv docs](https://github.com/nodenv/nodenv/wiki/FAQ#npm-warning-about-mismatched-binaries) recommend running the following command from any directory:
```sh ```shell
npm config set scripts-prepend-node-path auto npm config set scripts-prepend-node-path auto
``` ```

View File

@@ -126,7 +126,7 @@ Add a link to the article with a video's transcript in the description of the vi
In any content with an embedded video, add a `product_video_transcript` property below the `product_video` property in the YAML frontmatter. The value of `product_video_transcript` is a link to the transcript article in the `video-transcripts` directory. In any content with an embedded video, add a `product_video_transcript` property below the `product_video` property in the YAML frontmatter. The value of `product_video_transcript` is a link to the transcript article in the `video-transcripts` directory.
```YAML ```yaml
title: Example product landing page title: Example product landing page
product_video: 'https://www.youtube-nocookie.com/embed/URL' product_video: 'https://www.youtube-nocookie.com/embed/URL'
product_video_transcript: /content/video-transcripts/TRANSCRIPT-TITLE product_video_transcript: /content/video-transcripts/TRANSCRIPT-TITLE

View File

@@ -1,4 +1,4 @@
```YAML copy ```yaml copy
name: Bug Report name: Bug Report
description: File a bug report description: File a bug report
title: "[Bug]: " title: "[Bug]: "

View File

@@ -1,4 +1,4 @@
```YAML copy ```yaml copy
title: "[General] " title: "[General] "
labels: ["General Introduction"] labels: ["General Introduction"]
body: body:

View File

@@ -1,4 +1,4 @@
```HTML ```html
<picture> <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/25423296/163456776-7f95b81a-f1ed-45f7-b7ab-8fa810d529fa.png"> <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/25423296/163456776-7f95b81a-f1ed-45f7-b7ab-8fa810d529fa.png">
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png"> <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png">

View File

@@ -10,13 +10,13 @@ There are currently 3 general automated tests:
Just like with regular `jest` tests, if you haven't already done so... Just like with regular `jest` tests, if you haven't already done so...
```sh ```shell
npm run build npm run build
``` ```
Now, to run all the tests: Now, to run all the tests:
```sh ```shell
npm run playwright-test npm run playwright-test
``` ```
@@ -82,32 +82,32 @@ browser window will appear when tests run.
The most basic command is: The most basic command is:
```sh ```shell
npm run playwright-test -- --help npm run playwright-test -- --help
``` ```
This will guide you to all the options possible. For example, This will guide you to all the options possible. For example,
```sh ```shell
npm run playwright-test -- --headed npm run playwright-test -- --headed
``` ```
...will open a browser flickering through the tests. ...will open a browser flickering through the tests.
```sh ```shell
npm run playwright-test -- playwright-rendering.spec.ts npm run playwright-test -- playwright-rendering.spec.ts
``` ```
...will only run the tests in a file by that name. ...will only run the tests in a file by that name.
```sh ```shell
npm run playwright-test -- playwright-rendering.spec.ts:16 npm run playwright-test -- playwright-rendering.spec.ts:16
``` ```
...will run that specific `test('description here', async ({ page }))` on ...will run that specific `test('description here', async ({ page }))` on
line 16. line 16.
```sh ```shell
npm run playwright-test -- -g "view home page" npm run playwright-test -- -g "view home page"
``` ```
@@ -121,13 +121,13 @@ browsers aren't up-to-date.
In VSCode you might get this error: In VSCode you might get this error:
```sh ```shell
Browser was not installed. Invoke 'Install Playwright Browsers' action to install missing browsers. Browser was not installed. Invoke 'Install Playwright Browsers' action to install missing browsers.
``` ```
On the CLI you might get this: On the CLI you might get this:
```sh ```shell
Error: browserType.launch: Executable doesn't exist at /Users/peterbe/Library/Caches/ms-playwright/webkit-1848/pw_run.sh Error: browserType.launch: Executable doesn't exist at /Users/peterbe/Library/Caches/ms-playwright/webkit-1848/pw_run.sh
╔═════════════════════════════════════════════════════════════════════════╗ ╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║ ║ Looks like Playwright Test or Playwright was just installed or updated. ║
@@ -141,7 +141,7 @@ On the CLI you might get this:
All you have to do is run: All you have to do is run:
```sh ```shell
npx playwright install npx playwright install
``` ```
@@ -156,7 +156,7 @@ The first thing to do is familiarize yourself with how to run the CLI
that only opens the one specific test you're debugging. Then, you that only opens the one specific test you're debugging. Then, you
run the CLI with `--debug --headed`. For example: run the CLI with `--debug --headed`. For example:
```sh ```shell
npm run playwright-test -- -g "view home page" --debug --headed npm run playwright-test -- -g "view home page" --debug --headed
``` ```
@@ -168,7 +168,7 @@ to understand what's in the DOM.
Another thing that can help debugging is to open the browser just like Another thing that can help debugging is to open the browser just like
the script does. Run: the script does. Run:
```sh ```shell
npm run start-for-playwright npm run start-for-playwright
``` ```
@@ -183,13 +183,13 @@ debugger window it generates TypeScript code which you can copy-and-paste
into your editor/IDE when you're done. To use codegen you need to into your editor/IDE when you're done. To use codegen you need to
first manually start the server. In the **first terminal**: first manually start the server. In the **first terminal**:
```sh ```shell
npm run build && npm run start-for-playwright npm run build && npm run start-for-playwright
``` ```
In a **second terminal**: In a **second terminal**:
```sh ```shell
npx playwright codegen npx playwright codegen
``` ```

View File

@@ -16,7 +16,7 @@ We typically rely on CI to run our tests, so some large test-only
dependencies are considered **optional**. To run the tests locally, you'll dependencies are considered **optional**. To run the tests locally, you'll
need to make sure optional dependencies are installed by running: need to make sure optional dependencies are installed by running:
```sh ```shell
npm ci --include=optional npm ci --include=optional
``` ```
@@ -25,7 +25,7 @@ npm ci --include=optional
Once you've followed the development instructions above, you can run the entire Once you've followed the development instructions above, you can run the entire
test suite locally: test suite locally:
```sh ```shell
script/test # or `npm test` script/test # or `npm test`
``` ```
@@ -36,7 +36,7 @@ re-runs the tests whenever a change is made. This command notifies you
when tests change to and from a passing or failing state, and it prints when tests change to and from a passing or failing state, and it prints
out a test coverage report so you can see what files need testing. out a test coverage report so you can see what files need testing.
```sh ```shell
npm run test-watch npm run test-watch
``` ```
@@ -44,7 +44,7 @@ npm run test-watch
You can run specific tests in two ways: You can run specific tests in two ways:
```sh ```shell
# The TEST_NAME can be a filename, partial filename, or path to a file or directory # The TEST_NAME can be a filename, partial filename, or path to a file or directory
npm test -- <TEST_NAME> npm test -- <TEST_NAME>
@@ -59,7 +59,7 @@ If the tests fail locally with an error like this:
You may need to run this before every test run: You may need to run this before every test run:
```sh ```shell
npx next build npx next build
``` ```
@@ -68,7 +68,7 @@ npx next build
To validate all your JavaScript code (and auto-format some easily reparable mistakes), To validate all your JavaScript code (and auto-format some easily reparable mistakes),
run the linter: run the linter:
```sh ```shell
npm run lint npm run lint
``` ```
@@ -83,13 +83,13 @@ since the server won't need to start and stop every time you run tests.
In one terminal, type: In one terminal, type:
```sh ```shell
NODE_ENV=test PORT=4000 node server.js NODE_ENV=test PORT=4000 node server.js
``` ```
In another terminal, type: In another terminal, type:
```sh ```shell
START_JEST_SERVER=false jest tests/rendering/foo/bar.js START_JEST_SERVER=false jest tests/rendering/foo/bar.js
``` ```
@@ -107,7 +107,7 @@ a page to throw a 500 Internal Server Error response.
If you don't expect that and you might struggle to see exactly where the If you don't expect that and you might struggle to see exactly where the
error is happening, set `$DEBUG_MIDDLEWARE_TESTS` to `true`. For example: error is happening, set `$DEBUG_MIDDLEWARE_TESTS` to `true`. For example:
```sh ```shell
export DEBUG_MIDDLEWARE_TESTS=true export DEBUG_MIDDLEWARE_TESTS=true
jest tests/rendering/ -b jest tests/rendering/ -b
``` ```

View File

@@ -35,7 +35,7 @@ you want it to be.
Once you've found a place to put some fixture content, before writing Once you've found a place to put some fixture content, before writing
a `jest` test, you can preview your changes using: a `jest` test, you can preview your changes using:
```sh ```shell
npm run fixture-dev npm run fixture-dev
``` ```
@@ -52,7 +52,7 @@ about end-to-end testing a new custom Liquid tag called
To run the tests use: To run the tests use:
```sh ```shell
ROOT=tests/fixtures jest tests/rendering-fixtures/ ROOT=tests/fixtures jest tests/rendering-fixtures/
``` ```
@@ -72,7 +72,7 @@ so its translation repos copies can be translated.
There's a script you can always run that makes sure all and any of these There's a script you can always run that makes sure all and any of these
files are up to do: files are up to do:
```sh ```shell
./script/copy-fixture-data.js ./script/copy-fixture-data.js
``` ```

View File

@@ -13,7 +13,7 @@ type: how_to
{% raw %} {% raw %}
```sh ```shell
{% data foo.bar.buzz %} {% data foo.bar.buzz %}
{{ page.title }} {{ page.title }}
``` ```