Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/disable-fenced-code…
Browse files Browse the repository at this point in the history
…-language-rule' into disable-fenced-code-language-rule
  • Loading branch information
heiskr committed Sep 25, 2023
2 parents 14016d4 + ce11747 commit a2ab2f1
Show file tree
Hide file tree
Showing 27 changed files with 40 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ steps:

The example above creates an _.npmrc_ file with the following contents:

```ini
```shell
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
@octocat:registry=https://registry.npmjs.org/
always-auth=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ If setting environment variables is not practical, you can set the proxy configu

### Example `.env` proxy configuration

```ini
```shell
https_proxy=http://proxy.local:8080
no_proxy=example.com,myserver.local:443
```
Expand Down
4 changes: 2 additions & 2 deletions content/actions/learn-github-actions/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Replaces values in the `string`, with the variable `replaceValueN`. Variables in

{% raw %}

```js
```javascript
format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat')
```

Expand All @@ -208,7 +208,7 @@ Returns 'Hello Mona the Octocat'.

{% raw %}

```js
```javascript
format('{{Hello {0} {1} {2}!}}', 'Mona', 'the', 'Octocat')
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A credentials file must be a YAML file containing a list of server and access to

For example:

```yml
```yaml
- url: https://github.com
access_token: ghp_mygeneraltoken
- url: https://github.com/specific_org/
Expand All @@ -69,7 +69,7 @@ For the above credentials file, {% data variables.product.prodname_actions_impor

For example:

```yml
```yaml
- url: https://gitlab.com
access_token: super_secret_token
provider: gitlab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
In the example above, the `setup-node` action creates an `.npmrc` file on the runner with the following contents:

```ini
```shell
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true
Expand Down Expand Up @@ -148,7 +148,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
```shell
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
@octocat:registry=https://npm.pkg.github.com
always-auth=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If any of these services are at or near 100% CPU utilization, or the memory is n
- `actions.hcl.ctmpl`
1. For the services that you identified that need adjustment, open the corresponding file and locate the `resources` group that looks like the following:

```terraform
```text
resources {
cpu = 512
memory = 2048
Expand All @@ -141,7 +141,7 @@ If any of these services are at or near 100% CPU utilization, or the memory is n

For example, to increase the resource limits in the above example to 1 GHz for the CPU and 4 GB of memory, change it to:

```terraform
```text
resources {
cpu = 1024
memory = 4096
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To have your CI machines fetch from the repository cache instead of the primary

For example, the global `.gitconfig` for the CI machine would include these lines.

```gitconfig
```text
[url "https://europe-ci.github.example.com/"]
insteadOf = https://github.example.com/
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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
```shell
[cluster]
mysql-master = ghes-database-node-1
redis-master = ghes-database-node-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ The unauthenticated git protocol on port 9418 is no longer supported.

If you wish to support the unathenticated Git protocol in your environment, you must manually re-enable the feature. Run the following commands after your upgrade:

```ShellSession
```shell
sudo ghe-config app.gitauth.git-protocol true
sudo ghe-config-apply
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $ ssh -T git@{% data variables.command_line.codeblock %}
The first time you interact with {% data variables.product.prodname_dotcom %} after switching to port 443, you may get a warning message
that the host wasn't found in `known_hosts`, or that it was found by another name.

```ShellSession
```shell
> The authenticity of host '[ssh.github.com]:443 ([140.82.112.36]:443)' can't be established.
> ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
> This host key is known by the following other names/addresses:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ puts openssl_key.verify(OpenSSL::Digest::SHA256.new, Base64.decode64(signature),

**Validation sample in JavaScript**

```js
```javascript
const crypto = require("crypto");
const axios = require("axios");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ When {% data variables.product.prodname_github_codespaces %} creates a fork, or

By default, source control commands that you access from your editor's user interface, such as the **Sync Changes** button in {% data variables.product.prodname_vscode_shortname %}, target your fork. If you're working from the command line, you can use `origin` to refer to your fork and `upstream` to refer to the upstream repository. For example, you can fetch changes from the upstream repository to ensure your codespace is up to date with the latest changes to the project.

```Shell
```shell
git fetch upstream
```

When you have made some changes, you can push them to a feature branch of your fork.

```Shell
```shell
git push origin my-feature-branch
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ redirect_from:

![Screenshot of the "Marketplace" tab showing the installation code snippet for Terraform.](/assets/images/help/codespaces/feature-installation-code.png)

```JSON
```json
"features": {
...
"ghcr.io/devcontainers/features/terraform:1": {},
Expand All @@ -43,7 +43,7 @@ redirect_from:

![Screenshot of the "Options" section of the "Marketplace" tab, with the "version" and "tflint" properties expanded.](/assets/images/help/codespaces/feature-options.png)

```JSON
```json
"features": {
...
"ghcr.io/devcontainers/features/terraform:1": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You should configure your dev container with the tools and customization to give

The following configuration settings for a React template will open the `app.js` file in the user's editor, run `npm start` (defined in a `package.json` file) to start a local server, and forward port `3000` to a preview browser tab in the codespace.

```JSON
```json
{
"postAttachCommand": {
"server": "npm start"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you have disabled GPG verification, and are working in an existing codespace,

To keep making regular, unsigned commits in your codespace, reset `commit.gpgsign` to the default value of `false` by entering the following command in the terminal.

```Shell copy
```shell copy
git config --unset commit.gpgsign
```

Expand All @@ -54,7 +54,7 @@ To sign your commits with GPG, {% data variables.product.prodname_github_codespa

To check that these values are set correctly in a codespace, you can use the `git config --list --show-origin` command. Because {% data variables.product.prodname_github_codespaces %} sets this configuration at the system level, the required configuration settings should come from `/usr/local/etc/gitconfig`.

```Shell
```shell
$ git config --list --show-origin
file:/usr/local/etc/gitconfig credential.helper=/.codespaces/bin/gitcredential_github.sh
file:/usr/local/etc/gitconfig user.name=Mona Lisa
Expand Down Expand Up @@ -82,7 +82,7 @@ For example, if the global `.gitconfig` file on your local machine contains a `g
1. On your local machine, open a terminal.
1. To remove the conflicting value from `~/.gitconfig` (Mac/Linux) or `C:\Users\YOUR-USER\.gitconfig` (Windows), use the `git config --global --unset` command.

```Shell
```shell
git config --global --unset gpg.program
```

Expand All @@ -91,13 +91,13 @@ For example, if the global `.gitconfig` file on your local machine contains a `g

For example, you can use the `--system` flag to set the configuration in the system-level file at `PATH/etc/gitconfig`, where `PATH` is the directory in which Git is installed on your system.

```Shell
```shell
git config --system gpg.program gpg2
```

Alternatively, if your dotfiles repository contains an installation script in a recognized file such as `install.sh`, you can use the `$CODESPACES` environment variable to add conditional logic, such as only setting `gpg.program` when you are not in a codespace. In the following example, `-z "$CODESPACES"` returns `true` if you are not in a codespace.

```Shell copy
```shell copy
if [ -z "$CODESPACES" ]; then
git config --global gpg.program gpg2
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ Directory | Usage

When there are differences between plans, you can use Liquid conditionals to version the two images.

```{% raw %}
```markdown
{% raw %}
{% ifversion fpt or ghec %}
![An image of foo bar for GitHub Free, GitHub Pro, GitHub Team, and GitHub Enterprise Cloud](/assets/images/foo/bar.png)
{% else %}
Expand All @@ -209,7 +210,8 @@ If an image will change for {% data variables.product.prodname_ghe_server %} 3.1

Your Liquid conditional would look like this:

```{% raw %}
```markdown
{% raw %}
{% ifversion fpt or ghec %}
![An image of foo bar](/assets/images/foo/bar.png)
{% elsif ghes < 3.10 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ When referencing the URL of a label in Markdown, the label is automatically rend

The URL of a label can be found by navigating to the labels page and clicking on a label. For example, the URL of the label "enhancement" in our public [docs repository](https://github.com/github/docs/) is

```md
```markdown
https://github.com/github/docs/labels/enhancement
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g
1. In the directory you created, add some source code. For example:
```go
```golang
package main
import (
"github.com/cli/go-gh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Before you can use Jekyll to create a {% data variables.product.prodname_pages %
1. From the command line, run `bundle install`.
1. Optionally, make any necessary edits to the `_config.yml` file. This is required for relative paths when the repository is hosted in a subdirectory. For more information, see "[AUTOTITLE](/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository)."

```yml
```yaml
domain: my-site.github.io # if you want to force HTTPS, specify the domain without the http at the start, e.g. example.com
url: https://my-site.github.io # the base hostname and protocol for your site, e.g. http://example.com
baseurl: /REPOSITORY-NAME/ # place folder name if the site is served in a subfolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ All revisions specified in the `.git-blame-ignore-revs` file, which must be in t
1. In the root directory of your repository, create a file named `.git-blame-ignore-revs`.
1. Add the commit hashes you want to exclude from the blame view to that file. We recommend the file to be structured as follows, including comments:

```ini
```shell
# .git-blame-ignore-revs
# Removed semi-colons from the entire codebase
a8940f7fbddf7fad9d7d50014d4e8d46baf30592
Expand Down
2 changes: 1 addition & 1 deletion content/rest/guides/encrypting-secrets-for-the-rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ If you are using C#, you can encrypt your secret using the Sodium.Core package.

In the following example, replace `YOUR_SECRET` with the plain text value that you want to encrypt. Replace `YOUR_BASE64_KEY` with your Base64 encoded public key. The documentation for the endpoint that you will use to create a secret will tell you which endpoint you can use to get the public key.

```C# copy
```csharp copy
var secretValue = System.Text.Encoding.UTF8.GetBytes("YOUR_SECRET");
var publicKey = Convert.FromBase64String("YOUR_BASE64_KEY");

Expand Down
2 changes: 1 addition & 1 deletion data/reusables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Indented reusables require a special liquid tag: `indented_data_reference` which

For example, to indent `/data/reusables/foo/bar.md` in an ordered list, you could:

```md
```markdown
1. My first list item
{% indented_data_reference reusables.foo.par spaces=2 %}
1. My second list item
Expand Down
2 changes: 1 addition & 1 deletion data/reusables/gpg/configure-gpg-signing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1. If you have previously configured Git to use a different key format when signing with `--gpg-sign`, unset this configuration so the default format of `openpgp` will be used.

```Shell
```shell
git config --global --unset gpg.format
```
2 changes: 1 addition & 1 deletion data/reusables/gpg/set-auto-sign.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1. Optionally, to configure Git to sign all commits by default, enter the following command:

```Shell
```shell
git config --global commit.gpgsign true
```

Expand Down
2 changes: 1 addition & 1 deletion src/content-render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this directory is the main pipeline that converts our content from Liquid, Ma

## Usage

```js
```javascript
const renderContent = require('.')

const html = await renderContent(`
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In the `handle-redirects.js` middleware, the language part of the URL is
removed, looked up, and if matched to something, redirects with language
put back in. Demonstrated with pseudo code:

```js
```javascript
var fullPath = '/ja/foo'
var newPath = redirects['/foo']
if (newPath) {
Expand Down
2 changes: 1 addition & 1 deletion src/search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Index Name | Description

Each record represents a section of a page. Sections are derived by splitting up pages by their headings. Each record has a `title`, `intro` (if one exists in the frontmatter), `body` content (in text, not HTML), a `url`, and a unique `objectID` that is currently just the permalink of the article. Here's an example:

```js
```javascript
{
objectID: '/en/actions/creating-actions/about-actions#about-actions',
url: 'https://docs.github.com/en/actions/creating-actions/about-actions#about-actions',
Expand Down

0 comments on commit a2ab2f1

Please sign in to comment.