From e8a7ce2313e349b616587bd48b0d6a423da4e7f1 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 23 Oct 2020 22:36:22 -0400 Subject: [PATCH 1/5] chore: Add missing code fence languages --- content/README.md | 2 +- .../dockerfile-support-for-github-actions.md | 9 +++--- .../setting-exit-codes-for-actions.md | 2 +- .../guides/building-and-testing-nodejs.md | 2 +- ...hing-dependencies-to-speed-up-workflows.md | 8 ++--- .../guides/publishing-nodejs-packages.md | 4 +-- .../storing-workflow-data-as-artifacts.md | 2 +- ...a-proxy-server-with-self-hosted-runners.md | 2 +- .../adding-a-workflow-status-badge.md | 8 ++--- .../workflow-commands-for-github-actions.md | 4 +-- .../evacuating-a-cluster-node.md | 16 +++++----- .../initializing-the-cluster.md | 2 +- ...o-github-enterprise-server-214-or-later.md | 4 +-- ...manually-syncing-actions-from-githubcom.md | 2 +- .../creating-a-pre-receive-hook-script.md | 4 +-- .../migrating-to-internal-repositories.md | 4 +-- .../creating-a-github-app-from-a-manifest.md | 4 +-- .../creating-ci-tests-with-the-checks-api.md | 2 +- ...g-and-authorizing-users-for-github-apps.md | 2 +- .../developers/overview/secret-scanning.md | 4 +-- ...ngle-issue-template-for-your-repository.md | 2 +- ...a-merge-conflict-using-the-command-line.md | 16 +++++----- .../working-with-pre-receive-hooks.md | 2 +- ...-codeql-code-scanning-in-your-ci-system.md | 10 +++---- .../about-github-pages-and-jekyll.md | 4 +-- ...yll-build-errors-for-github-pages-sites.md | 4 +-- ...-to-your-github-pages-site-using-jekyll.md | 2 +- ...tom-404-page-for-your-github-pages-site.md | 2 +- ...yll-build-errors-for-github-pages-sites.md | 2 +- .../basic-writing-and-formatting-syntax.md | 16 +++++----- .../organizing-information-with-tables.md | 10 +++---- .../graphql/guides/introduction-to-graphql.md | 30 +++++++++---------- ...n-github-insights-and-github-enterprise.md | 2 +- .../deleting-a-package.md | 4 +-- ...ache-maven-for-use-with-github-packages.md | 10 +++---- ...guring-npm-for-use-with-github-packages.md | 2 +- ...g-rubygems-for-use-with-github-packages.md | 6 ++-- 37 files changed, 106 insertions(+), 105 deletions(-) diff --git a/content/README.md b/content/README.md index 901427d4be71..ac454b9d57d0 100644 --- a/content/README.md +++ b/content/README.md @@ -249,7 +249,7 @@ https://github-images.s3.amazonaws.com/enterprise/2.20/assets/images/help/profil Sometimes you want to link to a Dotcom-only article in Enterprise content and you don't want the link to be Enterprise-ified. To prevent the transformation, write the link using HTML and add a class of `dotcom-only`. For example: -``` +```html GitHub's Terms of Service ``` diff --git a/content/actions/creating-actions/dockerfile-support-for-github-actions.md b/content/actions/creating-actions/dockerfile-support-for-github-actions.md index 58809b0f2249..a8b27361ab60 100644 --- a/content/actions/creating-actions/dockerfile-support-for-github-actions.md +++ b/content/actions/creating-actions/dockerfile-support-for-github-actions.md @@ -47,20 +47,21 @@ The Docker `ENTRYPOINT` instruction has a _shell_ form and _exec_ form. The Dock If you configure your container to use the _exec_ form of the `ENTRYPOINT` instruction, the `args` configured in the action's metadata file won't run in a command shell. If the action's `args` contain an environment variable, the variable will not be substituted. For example, using the following _exec_ format will not print the value stored in `$GITHUB_SHA`, but will instead print `"$GITHUB_SHA"`. -``` +```dockerfile ENTRYPOINT ["echo $GITHUB_SHA"] ``` If you want variable substitution, then either use the _shell_ form or execute a shell directly. For example, using the following _exec_ format, you can execute a shell to print the value stored in the `GITHUB_SHA` environment variable. -``` +```dockerfile ENTRYPOINT ["sh", "-c", "echo $GITHUB_SHA"] -```` +``` To supply `args` defined in the action's metadata file to a Docker container that uses the _exec_ form in the `ENTRYPOINT`, we recommend creating a shell script called `entrypoint.sh` that you call from the `ENTRYPOINT` instruction: ##### Example *Dockerfile* -``` + +``` dockerfile # Container image that runs your code FROM debian:9.5-slim diff --git a/content/actions/creating-actions/setting-exit-codes-for-actions.md b/content/actions/creating-actions/setting-exit-codes-for-actions.md index 057c8cd2dcfa..845bd55213dc 100644 --- a/content/actions/creating-actions/setting-exit-codes-for-actions.md +++ b/content/actions/creating-actions/setting-exit-codes-for-actions.md @@ -40,7 +40,7 @@ For more information, see "[Creating a JavaScript action](/articles/creating-a-j If you are creating a Docker container action, you can set a failure exit code in your `entrypoint.sh` script. For example: -``` +```shell if ; then echo "Game over!" exit 1 diff --git a/content/actions/guides/building-and-testing-nodejs.md b/content/actions/guides/building-and-testing-nodejs.md index b24bc1e181db..cdaef082a477 100644 --- a/content/actions/guides/building-and-testing-nodejs.md +++ b/content/actions/guides/building-and-testing-nodejs.md @@ -219,7 +219,7 @@ steps: The example above creates an *.npmrc* file with the following contents: -``` +```ini //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} @octocat:registry=https://registry.npmjs.org/ always-auth=true diff --git a/content/actions/guides/caching-dependencies-to-speed-up-workflows.md b/content/actions/guides/caching-dependencies-to-speed-up-workflows.md index 497bcad57e58..1373238b80e6 100644 --- a/content/actions/guides/caching-dependencies-to-speed-up-workflows.md +++ b/content/actions/guides/caching-dependencies-to-speed-up-workflows.md @@ -123,14 +123,14 @@ A cache key can include any of the contexts, functions, literals, and operators Using expressions to create a `key` allows you to automatically create a new cache when dependencies have changed. For example, you can create a `key` using an expression that calculates the hash of an npm `package-lock.json` file. {% raw %} -``` +```yaml npm-${{ hashFiles('package-lock.json') }} ``` {% endraw %} {% data variables.product.prodname_dotcom %} evaluates the expression `hash "package-lock.json"` to derive the final `key`. -``` +```yaml npm-d5ea0750 ``` @@ -143,7 +143,7 @@ You can provide a list of restore keys to use when there is a cache miss on `key #### Example using multiple restore keys {% raw %} -``` +```yaml restore-keys: | npm-foobar-${{ hashFiles('package-lock.json') }} npm-foobar- @@ -154,7 +154,7 @@ restore-keys: | The runner evaluates the expressions, which resolve to these `restore-keys`: {% raw %} -``` +```yaml restore-keys: | npm-foobar-d5ea0750 npm-foobar- diff --git a/content/actions/guides/publishing-nodejs-packages.md b/content/actions/guides/publishing-nodejs-packages.md index 294001e7ee07..ee21fbde58f2 100644 --- a/content/actions/guides/publishing-nodejs-packages.md +++ b/content/actions/guides/publishing-nodejs-packages.md @@ -79,7 +79,7 @@ jobs: In the example above, the `setup-node` action creates an *.npmrc* file on the runner with the following contents: -``` +```ini //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} registry=https://registry.npmjs.org/ always-auth=true @@ -122,7 +122,7 @@ jobs: The `setup-node` action creates an *.npmrc* file on the runner. When you use the `scope` input to the `setup-node` action, the *.npmrc* file includes the scope prefix. By default, the `setup-node` action sets the scope in the *.npmrc* file to the account that contains that workflow file. -``` +```ini //npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} @octocat:registry=https://npm.pkg.github.com always-auth=true diff --git a/content/actions/guides/storing-workflow-data-as-artifacts.md b/content/actions/guides/storing-workflow-data-as-artifacts.md index f8a01faffd1e..2da4facf316d 100644 --- a/content/actions/guides/storing-workflow-data-as-artifacts.md +++ b/content/actions/guides/storing-workflow-data-as-artifacts.md @@ -115,7 +115,7 @@ jobs: You can define a custom retention period for individual artifacts created by a workflow. When using a workflow to create a new artifact, you can use `retention-days` with the `upload-artifact` action. This example demonstrates how to set a custom retention period of 5 days for the artifact named `my-artifact`: -``` +```yaml - name: 'Upload Artifact' uses: actions/upload-artifact@v2 with: diff --git a/content/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners.md b/content/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners.md index df6458092ed2..636be9a86044 100644 --- a/content/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners.md +++ b/content/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners.md @@ -37,7 +37,7 @@ If setting environment variables is not practical, you can set the proxy configu An example _.env_ proxy configuration is shown below: -``` +```ini https_proxy=http://proxy.local:8080 no_proxy=example.com,myserver.local:443 ``` diff --git a/content/actions/managing-workflow-runs/adding-a-workflow-status-badge.md b/content/actions/managing-workflow-runs/adding-a-workflow-status-badge.md index 162499b98ad3..523e8d551cb9 100644 --- a/content/actions/managing-workflow-runs/adding-a-workflow-status-badge.md +++ b/content/actions/managing-workflow-runs/adding-a-workflow-status-badge.md @@ -34,7 +34,7 @@ https://github.com///workflows//badge.svg This Markdown example adds a status badge for a workflow with the name "Greet Everyone." The `OWNER` of the repository is the `actions` organization and the `REPOSITORY` name is `hello-world`. -``` +```markdown ![example workflow name](https://github.com/actions/hello-world/workflows/Greet%20Everyone/badge.svg) ``` @@ -42,7 +42,7 @@ This Markdown example adds a status badge for a workflow with the name "Greet Ev This Markdown example adds a status badge for a workflow with the file path `.github/workflows/main.yml`. The `OWNER` of the repository is the `actions` organization and the `REPOSITORY` name is `hello-world`. -``` +```markdown ![example workflow file path](https://github.com/actions/hello-world/workflows/.github/workflows/main.yml/badge.svg) ``` @@ -50,7 +50,7 @@ This Markdown example adds a status badge for a workflow with the file path `.gi This Markdown example adds a status badge for a branch with the name `feature-1`. -``` +```markdown ![example branch parameter](https://github.com/actions/hello-world/workflows/Greet%20Everyone/badge.svg?branch=feature-1) ``` @@ -58,6 +58,6 @@ This Markdown example adds a status badge for a branch with the name `feature-1` This Markdown example adds a badge that displays the status of workflow runs triggered by the `pull_request` event. -``` +```markdown ![example event parameter](https://github.com/actions/hello-world/workflows/Greet%20Everyone/badge.svg?event=pull_request) ``` diff --git a/content/actions/reference/workflow-commands-for-github-actions.md b/content/actions/reference/workflow-commands-for-github-actions.md index 7c20f9df3a2b..9bf9e83e87bf 100644 --- a/content/actions/reference/workflow-commands-for-github-actions.md +++ b/content/actions/reference/workflow-commands-for-github-actions.md @@ -253,7 +253,7 @@ During the execution of a workflow, the runner generates temporary files that ca **Warning:** Powershell does not use UTF-8 by default. Make sure you write files using the correct encoding. For example, you need to set UTF-8 encoding when you set the path: -``` +```yaml steps: - run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append ``` @@ -287,7 +287,7 @@ For multiline strings, you may use a delimiter with the following syntax. ##### Example In this example, we use `EOF` as a delimiter and set the `JSON_RESPONSE` environment variable to the value of the curl response. -``` +```yaml steps: - name: Set the value id: step_one diff --git a/content/admin/enterprise-management/evacuating-a-cluster-node.md b/content/admin/enterprise-management/evacuating-a-cluster-node.md index ce81346f7571..6a0352c62547 100644 --- a/content/admin/enterprise-management/evacuating-a-cluster-node.md +++ b/content/admin/enterprise-management/evacuating-a-cluster-node.md @@ -14,40 +14,40 @@ If you're taking a node offline that has any data services (like git, pages, or 1. Find the `uuid` of the node in with the `ghe-config`command. - ``` + ```shell $ ghe-config cluster._hostname_.uuid ``` 2. You'll need to monitor the status of your node while the data is being copied. Ideally, the node shouldn't be taken offline until the copying is complete. To monitor the status of your node, run any of the following commands: For Git - ``` + ```shell ghe-spokes evac-status ``` For {% data variables.product.prodname_pages %} - ``` + ```shell echo "select count(*) from pages_replicas where host = 'pages-server-'" | ghe-dbconsole -y ``` For storage - ``` + ```shell ghe-storage evacuation-status ``` 3. After the copying is complete, you can evacuate the storage service. Run any of the following commands: For Git - ``` + ```shell ghe-spokes server evacuate git-server- ``` For {% data variables.product.prodname_pages %} - ``` + ```shell ghe-dpages evacuate pages-server- ``` For storage, take the node offline - ``` + ```shell ghe-storage offline storage-server- ``` then evacuate - ``` + ```shell ghe-storage evacuate storage-server- ``` diff --git a/content/admin/enterprise-management/initializing-the-cluster.md b/content/admin/enterprise-management/initializing-the-cluster.md index b6ff1105a891..1fc88c484a53 100644 --- a/content/admin/enterprise-management/initializing-the-cluster.md +++ b/content/admin/enterprise-management/initializing-the-cluster.md @@ -46,7 +46,7 @@ The names of the nodes can be any valid hostname you choose. The names are set a Specify the first cluster node you configured as the MySQL primary via `mysql-server` and `mysql-master`. -``` +```ini [cluster] mysql-master = ghe-data-node-1 redis-master = ghe-data-node-1 diff --git a/content/admin/enterprise-management/migrating-elasticsearch-indices-to-github-enterprise-server-214-or-later.md b/content/admin/enterprise-management/migrating-elasticsearch-indices-to-github-enterprise-server-214-or-later.md index caaf1d320091..36873ffa434a 100644 --- a/content/admin/enterprise-management/migrating-elasticsearch-indices-to-github-enterprise-server-214-or-later.md +++ b/content/admin/enterprise-management/migrating-elasticsearch-indices-to-github-enterprise-server-214-or-later.md @@ -19,7 +19,7 @@ versions: The migration script checks for any `search` indices first while the appliance is online. Migrating `search` indices can take a few minutes to a few days, depending on their size. For an example of large indices, these indices took a couple of days to migrate in our test environment. -``` +```shell admin@ip-172-31-2-141:~$ curl -s http://localhost:9200/_cat/indices?v | sort -n -k 6 green open blog-1 1 0 0 0 144b 144b green open projects-1 1 0 0 0 144b 144b @@ -72,7 +72,7 @@ The `webhook` indices start with `hookshot-logs-`. You can see available indices on your appliance using curl. -``` +```shell admin@ip-172-31-2-141:~$ curl -s http://localhost:9200/_cat/indices?v | sort -n -k 6 green open blog-1 1 0 0 0 144b 144b green open projects-1 1 0 0 0 144b 144b diff --git a/content/admin/github-actions/manually-syncing-actions-from-githubcom.md b/content/admin/github-actions/manually-syncing-actions-from-githubcom.md index 4002d2aff1d6..d898c1d78093 100644 --- a/content/admin/github-actions/manually-syncing-actions-from-githubcom.md +++ b/content/admin/github-actions/manually-syncing-actions-from-githubcom.md @@ -61,7 +61,7 @@ This example demonstrates using the `actions-sync` tool to sync an individual ac * You can sync multiple actions by replacing the `--repo-name` parameter with `--repo-name-list` or `--repo-name-list-file`. For more information, see the [`actions-sync` README](https://github.com/actions/actions-sync#actions-sync). 1. After the action repository is created on your enterprise instance, people in your enterprise can use the destination repository to reference the action in their workflows. For the example action shown above: - ``` + ```yaml uses: synced-actions/docker-build-push-action@v1 ``` diff --git a/content/admin/policies/creating-a-pre-receive-hook-script.md b/content/admin/policies/creating-a-pre-receive-hook-script.md index 9a37b9dee71d..9e83819b97db 100644 --- a/content/admin/policies/creating-a-pre-receive-hook-script.md +++ b/content/admin/policies/creating-a-pre-receive-hook-script.md @@ -94,7 +94,7 @@ You can test a pre-receive hook script locally before you create or update it on 2. Create a file called `Dockerfile.dev` containing: - ``` + ```dockerfile FROM gliderlabs/alpine:3.3 RUN \ apk add --no-cache git openssh bash && \ @@ -116,7 +116,7 @@ You can test a pre-receive hook script locally before you create or update it on 3. Create a test pre-receive script called `always_reject.sh`. This example script will reject all pushes, which is useful for locking a repository: - ``` + ```shell #!/usr/bin/env bash echo "error: rejecting all pushes" diff --git a/content/admin/user-management/migrating-to-internal-repositories.md b/content/admin/user-management/migrating-to-internal-repositories.md index fbd80a13f9a9..509a9e1a1197 100644 --- a/content/admin/user-management/migrating-to-internal-repositories.md +++ b/content/admin/user-management/migrating-to-internal-repositories.md @@ -33,11 +33,11 @@ If you don't have private mode enabled, the migration script will have no effect 1. Connect to the administrative shell. For more information, see "[Accessing the administrative shell (SSH)](/enterprise/admin/installation/accessing-the-administrative-shell-ssh)." 2. Navigate to the `/data/github/current` directory. - ``` + ```shell cd /data/github/current ``` 3. Run the migration command. - ``` + ```shell sudo bin/safe-ruby lib/github/transitions/20191210220630_convert_public_ghes_repos_to_internal.rb --verbose -w | tee -a /tmp/convert_public_ghes_repos_to_internal.log ``` diff --git a/content/developers/apps/creating-a-github-app-from-a-manifest.md b/content/developers/apps/creating-a-github-app-from-a-manifest.md index f68237c26a65..01b943be7cb0 100644 --- a/content/developers/apps/creating-a-github-app-from-a-manifest.md +++ b/content/developers/apps/creating-a-github-app-from-a-manifest.md @@ -80,7 +80,7 @@ Name | Type | Description This example uses a form on a web page with a button that triggers the `POST` request for a user account: -``` +```html
Create a GitHub App Manifest:
@@ -111,7 +111,7 @@ This example uses a form on a web page with a button that triggers the `POST` re ``` This example uses a form on a web page with a button that triggers the `POST` request for an organization account. Replace `ORGANIZATION` with the name of the organization account where you want to create the app. -``` +```html Create a GitHub App Manifest:
diff --git a/content/developers/apps/creating-ci-tests-with-the-checks-api.md b/content/developers/apps/creating-ci-tests-with-the-checks-api.md index dbe3fb274d86..d469e2691e45 100644 --- a/content/developers/apps/creating-ci-tests-with-the-checks-api.md +++ b/content/developers/apps/creating-ci-tests-with-the-checks-api.md @@ -724,7 +724,7 @@ To push to a repository, your app must have write permissions for "Repository co In order to commit files, Git must know which [username](/articles/setting-your-username-in-git/) and [email](/articles/setting-your-commit-email-address-in-git/) to associate with the commit. Add two more environment variables in your `.env` file to store the name (`GITHUB_APP_USER_NAME`) and email (`GITHUB_APP_USER_EMAIL`) settings. Your name can be the name of your app and the email can be any email you'd like for this example. For example: -``` +```ini GITHUB_APP_USER_NAME=Octoapp GITHUB_APP_USER_EMAIL=octoapp@octo-org.com ``` diff --git a/content/developers/apps/identifying-and-authorizing-users-for-github-apps.md b/content/developers/apps/identifying-and-authorizing-users-for-github-apps.md index 60a7f9be391f..e10d63526d62 100644 --- a/content/developers/apps/identifying-and-authorizing-users-for-github-apps.md +++ b/content/developers/apps/identifying-and-authorizing-users-for-github-apps.md @@ -89,7 +89,7 @@ Name | Type | Description By default, the response takes the following form. The response parameters `expires_in`, `refresh_token`, and `refresh_token_expires_in` are only returned when you enable the beta for expiring user-to-server access tokens. -``` +```json { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", "expires_in": "28800", diff --git a/content/developers/overview/secret-scanning.md b/content/developers/overview/secret-scanning.md index 054637e2a582..232bfa2707c6 100644 --- a/content/developers/overview/secret-scanning.md +++ b/content/developers/overview/secret-scanning.md @@ -61,7 +61,7 @@ Create a public, internet accessible HTTP endpoint at the URL you provided to us ##### Example POST sent to your endpoint -``` +```http POST / HTTP/1.1 Host: HOST Accept: */* @@ -95,7 +95,7 @@ Assuming you receive the following message, the code snippets below demonstrate The code also assumes you've set an environment variable called `GITHUB_PRODUCTION_TOKEN` with a generated PAT (https://github.com/settings/tokens). The token does not need any permissions set. **Sample message sent to verify endpoint** -``` +```http POST / HTTP/1.1 Host: HOST Accept: */* diff --git a/content/github/building-a-strong-community/manually-creating-a-single-issue-template-for-your-repository.md b/content/github/building-a-strong-community/manually-creating-a-single-issue-template-for-your-repository.md index 11a2016dcc50..781a16682ba4 100644 --- a/content/github/building-a-strong-community/manually-creating-a-single-issue-template-for-your-repository.md +++ b/content/github/building-a-strong-community/manually-creating-a-single-issue-template-for-your-repository.md @@ -18,7 +18,7 @@ You can add YAML frontmatter to each issue template to pre-fill the issue title, Here is example YAML front matter. -``` +```yaml --- name: Tracking issue about: Use this template for tracking new features. diff --git a/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md b/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md index c6ce42751821..5dae3a154053 100644 --- a/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md +++ b/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md @@ -46,14 +46,14 @@ For example, if you and another person both edited the file _styleguide.md_ on t 4. Open your favorite text editor, such as [Atom](https://atom.io/), and navigate to the file that has merge conflicts. 5. To see the beginning of the merge conflict in your file, search the file for the conflict marker `<<<<<<<`. When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line `<<<<<<< HEAD`. Next, you'll see `=======`, which divides your changes from the changes in the other branch, followed by `>>>>>>> BRANCH-NAME`. In this example, one person wrote "open an issue" in the base or HEAD branch and another person wrote "ask your question in IRC" in the compare branch or `branch-a`. - ``` -If you have questions, please -<<<<<<< HEAD -open an issue -======= -ask your question in IRC. ->>>>>>> branch-a - ```` + ``` + If you have questions, please + <<<<<<< HEAD + open an issue + ======= + ask your question in IRC. + >>>>>>> branch-a + ``` {% data reusables.pull_requests.decide-how-to-resolve-competing-line-change-merge-conflict %} In this example, both changes are incorporated into the final merge: ```shell diff --git a/content/github/collaborating-with-issues-and-pull-requests/working-with-pre-receive-hooks.md b/content/github/collaborating-with-issues-and-pull-requests/working-with-pre-receive-hooks.md index 85001ffa3167..5b78492e2303 100644 --- a/content/github/collaborating-with-issues-and-pull-requests/working-with-pre-receive-hooks.md +++ b/content/github/collaborating-with-issues-and-pull-requests/working-with-pre-receive-hooks.md @@ -11,7 +11,7 @@ Pre-receive hooks run tests on code pushed to a repository to ensure contributio If your push isn't accepted, you'll see an error message corresponding to the failed pre-receive hook. -``` +```shell $ git push Counting objects: 3, done. Delta compression using up to 4 threads. diff --git a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-codeql-code-scanning-in-your-ci-system.md b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-codeql-code-scanning-in-your-ci-system.md index 2e9b9ce6389e..944f9c4a302a 100644 --- a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-codeql-code-scanning-in-your-ci-system.md +++ b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-codeql-code-scanning-in-your-ci-system.md @@ -21,7 +21,7 @@ To integrate {% data variables.product.prodname_code_scanning %} into your CI sy In general, you invoke the {% data variables.product.prodname_codeql_runner %} as follows. -``` +```shell $ /path/to-runner/codeql-runner-OS ``` @@ -40,7 +40,7 @@ The {% data variables.product.prodname_codeql_runner %} automatically detects an To override automatic language detection, run the `init` command with the `--languages` flag, followed by a comma-separated list of language keywords. The keywords for the supported languages are `cpp`, `csharp`, `go`, `java`, `javascript`, and `python`. -``` +```shell $ /path/to-runner/codeql-runner-linux init --languages cpp,java ``` @@ -58,7 +58,7 @@ For more information, see "[Using a custom configuration file](#using-a-custom-c In the following example, the `+` symbol ensures that the {% data variables.product.prodname_codeql_runner %} uses the additional queries together with any queries specified in the referenced configuration file. -``` +```shell $ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-config.yml --queries +security-and-quality,octo-org/python-qlpack/show_ifs.ql@main ``` @@ -71,7 +71,7 @@ The configuration file is a YAML file. It uses syntax similar to the workflow sy Use the `--config-file` flag of the `init` command to specify the configuration file. The value of `--config-file` is the path to the configuration file that you want to use. This example loads the configuration file _.github/codeql/codeql-config.yml_. -``` +```shell $ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-config.yml ``` @@ -87,7 +87,7 @@ For many common build systems, the {% data variables.product.prodname_codeql_run The `autobuild` process only ever attempts to build _one_ compiled language for a repository. The language automatically selected for analysis is the language with the most files. If you want to choose a language explicitly, use the `--language` flag of the `autobuild` command. -``` +```shell $ /path/to-runner/codeql-runner-linux autobuild --language csharp ``` diff --git a/content/github/working-with-github-pages/about-github-pages-and-jekyll.md b/content/github/working-with-github-pages/about-github-pages-and-jekyll.md index 07804937c639..f15e93e71a8c 100644 --- a/content/github/working-with-github-pages/about-github-pages-and-jekyll.md +++ b/content/github/working-with-github-pages/about-github-pages-and-jekyll.md @@ -38,7 +38,7 @@ You can configure most Jekyll settings, such as your site's theme and plugins, b Some configuration settings cannot be changed for {% data variables.product.prodname_pages %} sites. -``` +```yaml lsi: false safe: true source: [your repo's top level directory] @@ -111,7 +111,7 @@ By default, code blocks on your site will be highlighted by Jekyll. Jekyll uses If you want to use another highlighter, such as `highlight.js`, you must disable Jekyll's syntax highlighting by updating your project's *_config.yml* file. -``` +```yaml kramdown: syntax_highlighter_opts: disable : true diff --git a/content/github/working-with-github-pages/about-jekyll-build-errors-for-github-pages-sites.md b/content/github/working-with-github-pages/about-jekyll-build-errors-for-github-pages-sites.md index f3ca97d47102..d3a5f57fbbfd 100644 --- a/content/github/working-with-github-pages/about-jekyll-build-errors-for-github-pages-sites.md +++ b/content/github/working-with-github-pages/about-jekyll-build-errors-for-github-pages-sites.md @@ -44,13 +44,13 @@ You can see build failures (but not build warnings) for your site on {% data var You can configure a third-party service, such as [Travis CI](https://travis-ci.org/), to display error messages after each commit. 1. If you haven't already, add a file called _Gemfile_ in the root of your publishing source, with the following content: - ``` + ```ruby source `https://rubygems.org` gem `github-pages` ``` 2. Configure your site's repository for the testing service of your choice. For example, to use [Travis CI](https://travis-ci.org/), add a file named _.travis.yml_ in the root of your publishing source, with the following content: - ``` + ```yaml language: ruby rvm: - 2.3 diff --git a/content/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.md b/content/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.md index 203b8088ee74..8d2717705516 100644 --- a/content/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.md +++ b/content/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.md @@ -42,7 +42,7 @@ People with write permissions for a repository can add a theme to a {% data vari {% data reusables.pages.navigate-publishing-source %} 1. Create a new file called _/assets/css/style.scss_. 2. Add the following content to the top of the file: - ``` + ```scss --- --- diff --git a/content/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site.md b/content/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site.md index f5523b51a7d8..e64b467d98c7 100644 --- a/content/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site.md +++ b/content/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site.md @@ -17,7 +17,7 @@ versions: 3. In the file name field, type `404.html` or `404.md`. ![File name field](/assets/images/help/pages/404-file-name.png) 4. If you named your file `404.md`, add the following YAML front matter to the beginning of the file: - ``` + ```yaml --- permalink: /404.html --- diff --git a/content/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites.md b/content/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites.md index 3b2bb2212b1e..22f7e9a64814 100644 --- a/content/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites.md +++ b/content/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites.md @@ -78,7 +78,7 @@ This error means that your code references a symlinked file that does not exist This error means that you used non-Latin characters, like `日本語`, without telling the computer to expect these symbols. To troubleshoot, force UTF-8 encoding by adding the following line to your *_config.yml* file: -``` +```yaml encoding: UTF-8 ``` diff --git a/content/github/writing-on-github/basic-writing-and-formatting-syntax.md b/content/github/writing-on-github/basic-writing-and-formatting-syntax.md index 4c0e0608898a..46e2f00d043b 100644 --- a/content/github/writing-on-github/basic-writing-and-formatting-syntax.md +++ b/content/github/writing-on-github/basic-writing-and-formatting-syntax.md @@ -13,7 +13,7 @@ versions: To create a heading, add one to six `#` symbols before your heading text. The number of `#` you use will determine the size of the heading. -``` +```markdown # The largest heading ## The second largest heading ###### The smallest heading @@ -37,7 +37,7 @@ You can indicate emphasis with bold, italic, or strikethrough text. You can quote text with a `>`. -``` +```markdown In the words of Abraham Lincoln: > Pardon my French @@ -55,7 +55,7 @@ In the words of Abraham Lincoln: You can call out code or a command within a sentence with single backticks. The text within the backticks will not be formatted. -``` +```markdown Use `git status` to list all new or modified files that haven't yet been committed. ``` @@ -102,7 +102,7 @@ You can create an inline link by wrapping link text in brackets `[ ]`, and then You can make an unordered list by preceding one or more lines of text with `-` or `*`. -``` +```markdown - George Washington - John Adams - Thomas Jefferson @@ -112,7 +112,7 @@ You can make an unordered list by preceding one or more lines of text with `-` o To order your list, precede each line with a number. -``` +```markdown 1. James Madison 2. James Monroe 3. John Quincy Adams @@ -126,7 +126,7 @@ You can create a nested list by indenting one or more list items below another i To create a nested list using the web editor on {% data variables.product.product_name %} or a text editor that uses a monospaced font, like [Atom](https://atom.io/), you can align your list visually. Type space characters in front of your nested list item, until the list marker character (`-` or `*`) lies directly below the first character of the text in the item above it. -``` +```markdown 1. First list item - First nested list item - Second nested list item @@ -140,7 +140,7 @@ To create a nested list in the comment editor on {% data variables.product.produ In this example, you could add a nested list item under the list item `100. First list item` by indenting the nested list item a minimum of five spaces, since there are five characters (`100. `) before `First list item`. -``` +```markdown 100. First list item - First nested list item ``` @@ -149,7 +149,7 @@ In this example, you could add a nested list item under the list item `100. Firs You can create multiple levels of nested lists using the same method. For example, because the first nested list item has seven spaces (`␣␣␣␣␣-␣`) before the nested list content `First nested list item`, you would need to indent the second nested list item by seven spaces. -``` +```markdown 100. First list item - First nested list item - Second nested list item diff --git a/content/github/writing-on-github/organizing-information-with-tables.md b/content/github/writing-on-github/organizing-information-with-tables.md index 07a84b6ad6b8..aad54f147a8e 100644 --- a/content/github/writing-on-github/organizing-information-with-tables.md +++ b/content/github/writing-on-github/organizing-information-with-tables.md @@ -13,7 +13,7 @@ versions: You can create tables with pipes `|` and hyphens `-`. Hyphens are used to create each column's header, while pipes separate each column. You must include a blank line before your table in order for it to correctly render. -``` +```markdown | First Header | Second Header | | ------------- | ------------- | @@ -27,7 +27,7 @@ The pipes on either end of the table are optional. Cells can vary in width and do not need to be perfectly aligned within columns. There must be at least three hyphens in each column of the header row. -``` +```markdown | Command | Description | | --- | --- | | git status | List all new or modified files | @@ -40,7 +40,7 @@ Cells can vary in width and do not need to be perfectly aligned within columns. You can use [formatting](/articles/basic-writing-and-formatting-syntax) such as links, inline code blocks, and text styling within your table: -``` +```markdown | Command | Description | | --- | --- | | `git status` | List all *new or modified* files | @@ -51,7 +51,7 @@ You can use [formatting](/articles/basic-writing-and-formatting-syntax) such as You can align text to the left, right, or center of a column by including colons `:` to the left, right, or on both sides of the hyphens within the header row. -``` +```markdown | Left-aligned | Center-aligned | Right-aligned | | :--- | :---: | ---: | | git status | git status | git status | @@ -62,7 +62,7 @@ You can align text to the left, right, or center of a column by including colons To include a pipe `|` as content within your cell, use a `\` before the pipe: -``` +```markdown | Name | Character | | --- | --- | | Backtick | ` | diff --git a/content/graphql/guides/introduction-to-graphql.md b/content/graphql/guides/introduction-to-graphql.md index 6174e3aa01e1..f314290c9e82 100644 --- a/content/graphql/guides/introduction-to-graphql.md +++ b/content/graphql/guides/introduction-to-graphql.md @@ -81,33 +81,33 @@ GraphQL is [introspective](https://graphql.github.io/learn/introspection/). This * Query `__schema` to list all types defined in the schema and get details about each: ```graphql -query { - __schema { - types { - name - kind - description - fields { + query { + __schema { + types { name + kind + description + fields { + name + } } } } -} ``` * Query `__type` to get details about any type: ```graphql -query { - __type(name: "Repository") { - name - kind - description - fields { + query { + __type(name: "Repository") { name + kind + description + fields { + name + } } } -} ``` * You can also run an _introspection query_ of the schema via a `GET` request: diff --git a/content/insights/installing-and-configuring-github-insights/enabling-a-link-between-github-insights-and-github-enterprise.md b/content/insights/installing-and-configuring-github-insights/enabling-a-link-between-github-insights-and-github-enterprise.md index c69bf53c6087..55ba0b6a6e69 100644 --- a/content/insights/installing-and-configuring-github-insights/enabling-a-link-between-github-insights-and-github-enterprise.md +++ b/content/insights/installing-and-configuring-github-insights/enabling-a-link-between-github-insights-and-github-enterprise.md @@ -14,7 +14,7 @@ After you enable the link, each user can navigate directly from {% data variable 1. Connect to the administrative shell for {% data variables.product.prodname_ghe_server %}. For more information, see "[Accessing the administrative shell (SSH)](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/)." 2. Run the following command. - ``` + ```shell ghe-config 'app.github.insights-available' 'true' && ghe-config-apply ``` 3. Return to {% data variables.product.prodname_ghe_server %}. diff --git a/content/packages/publishing-and-managing-packages/deleting-a-package.md b/content/packages/publishing-and-managing-packages/deleting-a-package.md index 72db48bacf84..22422de8e077 100644 --- a/content/packages/publishing-and-managing-packages/deleting-a-package.md +++ b/content/packages/publishing-and-managing-packages/deleting-a-package.md @@ -61,7 +61,7 @@ Use the `deletePackageVersion` mutation in the GraphQL API. You must use a token Here is an example cURL command to delete a package version with the package version ID of `MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg`, using a personal access token. {% if currentVersion == "free-pro-team@latest" %} -``` +```shell curl -X POST \ -H "Accept: application/vnd.github.package-deletes-preview+json" \ -H "Authorization: bearer TOKEN" \ @@ -71,7 +71,7 @@ https://api.github.com/graphql {% else %} -``` +```shell curl -X POST \ -H "Accept: application/vnd.github.package-deletes-preview+json" \ -H "Authorization: bearer TOKEN" \ diff --git a/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages.md b/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages.md index 0d8c2df1cca7..4e04a1e98cdc 100644 --- a/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages.md +++ b/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages.md @@ -37,7 +37,7 @@ If you want to interact with multiple repositories, you can add each repository If your instance has subdomain isolation enabled: {% endif %} -``` +```xml "ssh://{% if currentVersion == "free-pro-team@latest" %}github.com{% else %}HOSTNAME{% endif %}/OWNER/REPOSITORY" } ``` @@ -118,7 +118,7 @@ You can use gems from {% data variables.product.prodname_registry %} much like y {% data reusables.package_registry.authenticate-step %} 2. For Bundler, add your {% data variables.product.prodname_dotcom %} user or organization as a source in your *Gemfile* to fetch gems from this new source. For example, you can add a new `source` block to your *Gemfile* that uses {% data variables.product.prodname_registry %} only for the packages you specify, replacing *GEM NAME* with the package you want to install from {% data variables.product.prodname_registry %} and *OWNER* with the user or organization that owns the repository containing the gem you want to install.{% if enterpriseServerVersions contains currentVersion %} Replace `REGISTRY-URL` with the URL for your instance's Rubygems registry. If your instance has subdomain isolation enabled, use `rubygems.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/rubygems`. In either case, replace *HOSTNAME* with the host name of your {% data variables.product.prodname_ghe_server %} instance.{% endif %} - ``` + ```ruby source "https://rubygems.org" gem "rails" @@ -130,7 +130,7 @@ You can use gems from {% data variables.product.prodname_registry %} much like y 3. For Bundler versions earlier than 1.7.0, you need to add a new global `source`. For more information on using Bundler, see the [bundler.io documentation](http://bundler.io/v1.5/gemfile.html). - ``` + ```ruby source "https://{% if currentVersion == "free-pro-team@latest" %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER" source "https://rubygems.org" From 289af507edb7855ce63b09d457efbda8449e714f Mon Sep 17 00:00:00 2001 From: hubwriter Date: Tue, 12 Jan 2021 08:17:39 +0000 Subject: [PATCH 2/5] Update content/actions/creating-actions/dockerfile-support-for-github-actions.md --- .../creating-actions/dockerfile-support-for-github-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/creating-actions/dockerfile-support-for-github-actions.md b/content/actions/creating-actions/dockerfile-support-for-github-actions.md index a8b27361ab60..37b17ed28545 100644 --- a/content/actions/creating-actions/dockerfile-support-for-github-actions.md +++ b/content/actions/creating-actions/dockerfile-support-for-github-actions.md @@ -61,7 +61,7 @@ ENTRYPOINT ["sh", "-c", "echo $GITHUB_SHA"] ##### Example *Dockerfile* -``` dockerfile +```dockerfile # Container image that runs your code FROM debian:9.5-slim From 4736cce073e4c4088d3d172782b3f46c856aef98 Mon Sep 17 00:00:00 2001 From: hubwriter Date: Tue, 12 Jan 2021 08:23:56 +0000 Subject: [PATCH 3/5] Add raw & endraw markers around shell content See review comment by @rachmari --- .../actions/creating-actions/setting-exit-codes-for-actions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/actions/creating-actions/setting-exit-codes-for-actions.md b/content/actions/creating-actions/setting-exit-codes-for-actions.md index 845bd55213dc..286c4f3ae42b 100644 --- a/content/actions/creating-actions/setting-exit-codes-for-actions.md +++ b/content/actions/creating-actions/setting-exit-codes-for-actions.md @@ -40,11 +40,13 @@ For more information, see "[Creating a JavaScript action](/articles/creating-a-j If you are creating a Docker container action, you can set a failure exit code in your `entrypoint.sh` script. For example: +{% raw %} ```shell if ; then echo "Game over!" exit 1 fi ``` +{% endraw %} For more information, see "[Creating a Docker container action](/articles/creating-a-docker-container-action)." From 84bcc5037c9d33d33196ad341e3b465bef9b3ae6 Mon Sep 17 00:00:00 2001 From: hubwriter Date: Tue, 12 Jan 2021 08:28:55 +0000 Subject: [PATCH 4/5] Add raw & endraw markers around shell content See review comment by @rachmari --- .../enterprise-management/evacuating-a-cluster-node.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/admin/enterprise-management/evacuating-a-cluster-node.md b/content/admin/enterprise-management/evacuating-a-cluster-node.md index 6a0352c62547..a6e2effc0795 100644 --- a/content/admin/enterprise-management/evacuating-a-cluster-node.md +++ b/content/admin/enterprise-management/evacuating-a-cluster-node.md @@ -25,9 +25,11 @@ If you're taking a node offline that has any data services (like git, pages, or ghe-spokes evac-status ``` For {% data variables.product.prodname_pages %} + {% raw %} ```shell echo "select count(*) from pages_replicas where host = 'pages-server-'" | ghe-dbconsole -y ``` + {% endraw %} For storage ```shell ghe-storage evacuation-status @@ -36,18 +38,26 @@ If you're taking a node offline that has any data services (like git, pages, or 3. After the copying is complete, you can evacuate the storage service. Run any of the following commands: For Git + {% raw %} ```shell ghe-spokes server evacuate git-server- ``` + {% endraw %} For {% data variables.product.prodname_pages %} + {% raw %} ```shell ghe-dpages evacuate pages-server- ``` + {% endraw %} For storage, take the node offline + {% raw %} ```shell ghe-storage offline storage-server- ``` + {% endraw %} then evacuate + {% raw %} ```shell ghe-storage evacuate storage-server- ``` + {% endraw %} From 73329f749dd48b818852d83acc02654590bb9ead Mon Sep 17 00:00:00 2001 From: hubwriter Date: Mon, 18 Jan 2021 11:12:51 +0000 Subject: [PATCH 5/5] Remove language from code fences to avoid the problem of replaceable text indicates like not showing up in the output page. --- .../setting-exit-codes-for-actions.md | 2 +- .../evacuating-a-cluster-node.md | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/actions/creating-actions/setting-exit-codes-for-actions.md b/content/actions/creating-actions/setting-exit-codes-for-actions.md index 4faf3484c372..2a733849d5c0 100644 --- a/content/actions/creating-actions/setting-exit-codes-for-actions.md +++ b/content/actions/creating-actions/setting-exit-codes-for-actions.md @@ -42,7 +42,7 @@ For more information, see "[Creating a JavaScript action](/articles/creating-a-j If you are creating a Docker container action, you can set a failure exit code in your `entrypoint.sh` script. For example: {% raw %} -```shell +``` if ; then echo "Game over!" exit 1 diff --git a/content/admin/enterprise-management/evacuating-a-cluster-node.md b/content/admin/enterprise-management/evacuating-a-cluster-node.md index a6e2effc0795..c429e9270723 100644 --- a/content/admin/enterprise-management/evacuating-a-cluster-node.md +++ b/content/admin/enterprise-management/evacuating-a-cluster-node.md @@ -14,50 +14,50 @@ If you're taking a node offline that has any data services (like git, pages, or 1. Find the `uuid` of the node in with the `ghe-config`command. - ```shell + ``` $ ghe-config cluster._hostname_.uuid ``` -2. You'll need to monitor the status of your node while the data is being copied. Ideally, the node shouldn't be taken offline until the copying is complete. To monitor the status of your node, run any of the following commands: +2. You'll need to monitor the status of your node while the data is being copied. Ideally, the node shouldn't be taken offline until the copying is complete. To monitor the status of your node, run any of the following commands: For Git - ```shell + ``` ghe-spokes evac-status ``` For {% data variables.product.prodname_pages %} {% raw %} - ```shell + ``` echo "select count(*) from pages_replicas where host = 'pages-server-'" | ghe-dbconsole -y ``` {% endraw %} For storage - ```shell + ``` ghe-storage evacuation-status ``` -3. After the copying is complete, you can evacuate the storage service. Run any of the following commands: +3. After the copying is complete, you can evacuate the storage service. Run any of the following commands: For Git {% raw %} - ```shell + ``` ghe-spokes server evacuate git-server- ``` {% endraw %} For {% data variables.product.prodname_pages %} {% raw %} - ```shell + ``` ghe-dpages evacuate pages-server- ``` {% endraw %} For storage, take the node offline {% raw %} - ```shell + ``` ghe-storage offline storage-server- ``` {% endraw %} then evacuate - {% raw %} - ```shell + {% raw %} + ``` ghe-storage evacuate storage-server- ``` {% endraw %}