fix incorrect code language case

This commit is contained in:
Rachael Sewell 2023-09-25 11:21:53 -07:00
Родитель e3f499b90c
Коммит b8bd4630f6
21 изменённых файлов: 64 добавлений и 64 удалений

Просмотреть файл

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

Просмотреть файл

@ -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.
```Dockerfile copy
```dockerfile copy
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 as build
# Replace value with the latest runner release version

Просмотреть файл

@ -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.
```Dockerfile copy
```dockerfile copy
ARG VARIANT="16-buster"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

Просмотреть файл

@ -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. 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)
```
For example:
```Markdown
```markdown
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/github/docs)
```

Просмотреть файл

@ -99,7 +99,7 @@ For multi-line text, you can use the pipe operator.
#### Example of `markdown`
```YAML copy
```yaml copy
body:
- type: markdown
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`
```YAML copy
```yaml copy
body:
- type: textarea
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`
```YAML copy
```yaml copy
body:
- type: input
id: prevalence
@ -216,7 +216,7 @@ You can use a `dropdown` element to add a dropdown menu in your form.
#### Example of `dropdown`
```YAML copy
```yaml copy
body:
- type: dropdown
id: download
@ -259,7 +259,7 @@ You can use the `checkboxes` element to add a set of checkboxes to your form.
#### Example of `checkboxes`
```YAML copy
```yaml copy
body:
- type: checkboxes
id: operating-systems

Просмотреть файл

@ -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.
```YAML copy
```yaml copy
name:
description:
body:

Просмотреть файл

@ -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.
```sh
```shell
git clone https://github.com/github/docs
cd docs
npm ci

Просмотреть файл

@ -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.
```YAML
```yaml
title: Example product landing page
product_video: 'https://www.youtube-nocookie.com/embed/URL'
product_video_transcript: /content/video-transcripts/TRANSCRIPT-TITLE

Просмотреть файл

@ -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.
```YAML copy
```yaml copy
body:
- type: input
id: suggestion

Просмотреть файл

@ -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.
```HTML copy
```html copy
<picture>
<source media="(prefers-color-scheme: dark)" srcset="YOUR-DARKMODE-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. 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
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.
```Markdown copy
```markdown copy
| Rank | THING-TO-RANK |
|-----:|---------------|
| 1| |
@ -117,7 +117,7 @@ For more information, see "[AUTOTITLE](/get-started/writing-on-github/working-wi
### Example of a table
```Markdown
```markdown
## About me
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.
```HTML copy
```html copy
<details>
<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. Optionally, to make the section display as open by default, add the `open` attribute to the `<details>` tag.
```HTML
```html
<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
```HTML
```html
<details>
<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.
```Markdown
```markdown
---
```
1. Below the `---` line, add a quote by typing markup like the following.
```Markdown
```markdown
> QUOTE
```
@ -197,7 +197,7 @@ Markdown has many other options for formatting your content. Here, you'll add a
### Example of a quote
```Markdown
```markdown
---
> If we pull together and commit ourselves, then we can push through anything.

Просмотреть файл

@ -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.
```sh
```shell
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.
```sh
```shell
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"`.
```sh
```shell
gh webhook forward --repo=REPOSITORY --events=EVENTS --url=URL
```

Просмотреть файл

@ -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:
```sh
```shell
git clone https://github.com/github/docs
cd docs
npm ci

Просмотреть файл

@ -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:
```sh
```shell
brew upgrade nodenv node-build
```
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.
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:
```sh
```shell
# Set VERSION= based on package.json#engines
nodenv install $VERSION && nodenv global $VERSION
```
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 [...]
```
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
```

Просмотреть файл

@ -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.
```YAML
```yaml
title: Example product landing page
product_video: 'https://www.youtube-nocookie.com/embed/URL'
product_video_transcript: /content/video-transcripts/TRANSCRIPT-TITLE

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1,4 +1,4 @@
```HTML
```html
<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: light)" srcset="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png">

Просмотреть файл

@ -10,13 +10,13 @@ There are currently 3 general automated tests:
Just like with regular `jest` tests, if you haven't already done so...
```sh
```shell
npm run build
```
Now, to run all the tests:
```sh
```shell
npm run playwright-test
```
@ -82,32 +82,32 @@ browser window will appear when tests run.
The most basic command is:
```sh
```shell
npm run playwright-test -- --help
```
This will guide you to all the options possible. For example,
```sh
```shell
npm run playwright-test -- --headed
```
...will open a browser flickering through the tests.
```sh
```shell
npm run playwright-test -- playwright-rendering.spec.ts
```
...will only run the tests in a file by that name.
```sh
```shell
npm run playwright-test -- playwright-rendering.spec.ts:16
```
...will run that specific `test('description here', async ({ page }))` on
line 16.
```sh
```shell
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:
```sh
```shell
Browser was not installed. Invoke 'Install Playwright Browsers' action to install missing browsers.
```
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
╔═════════════════════════════════════════════════════════════════════════╗
║ 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:
```sh
```shell
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
run the CLI with `--debug --headed`. For example:
```sh
```shell
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
the script does. Run:
```sh
```shell
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
first manually start the server. In the **first terminal**:
```sh
```shell
npm run build && npm run start-for-playwright
```
In a **second terminal**:
```sh
```shell
npx playwright codegen
```

Просмотреть файл

@ -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
need to make sure optional dependencies are installed by running:
```sh
```shell
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
test suite locally:
```sh
```shell
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
out a test coverage report so you can see what files need testing.
```sh
```shell
npm run test-watch
```
@ -44,7 +44,7 @@ npm run test-watch
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
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:
```sh
```shell
npx next build
```
@ -68,7 +68,7 @@ npx next build
To validate all your JavaScript code (and auto-format some easily reparable mistakes),
run the linter:
```sh
```shell
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:
```sh
```shell
NODE_ENV=test PORT=4000 node server.js
```
In another terminal, type:
```sh
```shell
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
error is happening, set `$DEBUG_MIDDLEWARE_TESTS` to `true`. For example:
```sh
```shell
export DEBUG_MIDDLEWARE_TESTS=true
jest tests/rendering/ -b
```

6
tests/fixtures/README.md поставляемый
Просмотреть файл

@ -35,7 +35,7 @@ you want it to be.
Once you've found a place to put some fixture content, before writing
a `jest` test, you can preview your changes using:
```sh
```shell
npm run fixture-dev
```
@ -52,7 +52,7 @@ about end-to-end testing a new custom Liquid tag called
To run the tests use:
```sh
```shell
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
files are up to do:
```sh
```shell
./script/copy-fixture-data.js
```

Просмотреть файл

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