Skip to content

Commit

Permalink
sh -> bash
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Jul 26, 2023
1 parent 7fec2b5 commit 2c66ef0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ This will make it easier to submit a pull request for your changes.
3. Check for errors by clicking `Show flaws` on each previewed page.
You may be able to fix flaws by running:

```sh
```bash
yarn content flaws <page_slug>
```

4. Commit your changes to the branch (our example is using the `fix-typo` branch) and push the changes to your fork's remote:
```sh
```bash
# Adding all files to the commit
git add .
# Making a commit with a message describing the changes
Expand Down Expand Up @@ -241,7 +241,7 @@ There are a few things to keep in mind:
Moving one or more documents (or an entire tree of documents) is made easier with the `yarn content move` command.
This command moves the file and fixes up redirects automatically. You can use this command as shown below:
```sh
```bash
yarn content move <from-slug> <to-slug> [locale]
```
Expand All @@ -257,7 +257,7 @@ Let's say you want to move the entire `/en-US/Learn/Accessibility` tree to `/en-
1. Starting from a fresh branch:
```sh
```bash
cd ~/repos/content
# Fetch the latest changes from the main branch on mdn/content
git fetch upstream
Expand All @@ -270,13 +270,13 @@ Let's say you want to move the entire `/en-US/Learn/Accessibility` tree to `/en-
2. Move files with `yarn content move`.
This will delete and modify existing files, as well as create new files.
```sh
```bash
yarn content move Learn/Accessibility Learn/A11y
```
3. Commit all of the changes and push your branch to the remote:
```sh
```bash
git add .
git commit -m "Move Learn/Accessibility to Learn/A11y"
git push
Expand All @@ -292,14 +292,14 @@ Similar to moving files, you can delete documents or a tree of documents easily
You can use this command as shown below:
```sh
```bash
yarn content delete <document-slug> [locale] --redirect <redirect-slug-or-url>
```
To use `yarn content delete`, provide the slug of the document you'd like to delete (e.g., `Learn/Accessibility`), and the locale as an optional second argument (this defaults to `en-US`).
If the slug of the page you wish to delete contains special characters, include it in quotes. For example:
```sh
```bash
yarn content delete "Glossary/Round_Trip_Time_(RTT)" --redirect Glossary/Latency
```
Expand All @@ -308,7 +308,7 @@ Say you want to delete the entire `/en-US/Learn/Accessibility` tree and redirect
1. Start from a fresh branch.
```sh
```bash
cd ~/repos/content
# Fetch the latest changes from the main branch on mdn/content
git fetch upstream
Expand All @@ -320,7 +320,7 @@ Say you want to delete the entire `/en-US/Learn/Accessibility` tree and redirect
2. Run the `yarn content delete` command and redirect all deleted documents.
```sh
```bash
yarn content delete Learn/Accessibility --recursive --redirect Web/Accessibility
```
Expand All @@ -330,7 +330,7 @@ Say you want to delete the entire `/en-US/Learn/Accessibility` tree and redirect
3. Commit all of the changes and push your branch to the remote.
```sh
```bash
git add .
git commit -m "Delete Learn/Accessibility pages"
git push
Expand All @@ -346,7 +346,7 @@ You may do this by using the `yarn content add-redirect` command.
1. Start a fresh branch to work in:
```sh
```bash
cd ~/repos/content
# Fetch the latest changes from the main branch on mdn/content
git fetch upstream
Expand All @@ -358,13 +358,13 @@ You may do this by using the `yarn content add-redirect` command.
2. Add a redirect with `yarn content add-redirect`. The target page can be a page on MDN or an external URL:
```sh
```bash
yarn content add-redirect /en-US/path/of/deleted/page /en-US/path/of/target/page
```
3. Commit all of the changed files and pushing your branch to your fork:
```sh
```bash
git add .
git commit -m "Adding redirect after deleting Learn/Accessibility pages"
git push
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The general step-by-step process for creating a page would be:

1. Start a fresh, up-to-date branch to work in.

```sh
```bash
cd ~/repos/mdn/content
git checkout main
git pull mdn main
Expand All @@ -36,7 +36,7 @@ The general step-by-step process for creating a page would be:

3. Add and commit your new files as well as push your new branch to your fork.

```sh
```bash
git add files/en-us/folder/you/created
git commit -m "appropriate message about your changes"
git push -u origin my-add
Expand All @@ -49,7 +49,7 @@ The general step-by-step process for creating a page would be:
Moving one or more documents or an entire tree of documents is easy
because we've created a special command that takes care of the details for you:
```sh
```bash
yarn content move <from-slug> <to-slug> [locale]
```
Expand All @@ -67,7 +67,7 @@ For example, let's say you want to move the entire
1. You'll start a fresh branch to work in.

```sh
```bash
cd ~/repos/mdn/content
git checkout main
git pull mdn main
Expand All @@ -79,13 +79,13 @@ For example, let's say you want to move the entire

2. Perform the move (which will delete and modify existing files as well as create new files).

```sh
```bash
yarn content move Learn/Accessibility Learn/A11y
```

3. Add and commit all of the deleted, created, and modified files as well as push your branch to your fork.

```sh
```bash
git commit -a
git push -u origin my-move
```
Expand All @@ -101,7 +101,7 @@ Documents should only be removed from MDN Web Docs under special circumstances.
Deleting one or more documents or an entire tree of documents is easy, just like moving pages, because we've created a special command that takes care of the
details for you:

```sh
```bash
yarn content delete <document-slug> [locale]
```

Expand All @@ -120,7 +120,7 @@ entire `/en-US/Learn/Accessibility` tree, you'd perform the following steps:

1. You'll start a fresh branch to work in.
```sh
```bash
cd ~/repos/mdn/content
git checkout main
git pull mdn main
Expand All @@ -132,19 +132,19 @@ entire `/en-US/Learn/Accessibility` tree, you'd perform the following steps:

2. Perform the delete.

```sh
```bash
yarn content delete Learn/Accessibility --recursive
```

3. Add a redirect. The target page can be an external URL or another page on MDN Web Docs.

```sh
```bash
yarn content add-redirect /en-US/path/of/deleted/page /en-US/path/of/target/page
```

4. Add and commit all of the deleted files as well as push your branch to your fork.

```sh
```bash
git commit -a
git push -u origin my-delete
```
Expand All @@ -153,7 +153,7 @@ entire `/en-US/Learn/Accessibility` tree, you'd perform the following steps:

> **Note:** If the slug of the page you wish to delete contains special characters, include it in quotes, like so:
>
> ```sh
> ```bash
> yarn content delete "Mozilla/Add-ons/WebExtensions/Debugging_(before_Firefox_50)"
> ```

Expand Down
10 changes: 5 additions & 5 deletions files/en-us/mdn/writing_guidelines/howto/images_media/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Let's walk through an example:

1. Start with a fresh working branch with the latest content from the `main` branch of the `mdn` remote.

```sh
```bash
cd ~/path/to/mdn/content
git checkout main
git pull mdn main
Expand All @@ -27,15 +27,15 @@ Let's walk through an example:
2. Add your image to the document folder. For this example, let's assume
we're adding a new image to the `files/en-us/web/css` document.

```sh
```bash
cd ~/path/to/mdn/content
cp ../some/path/my-cool-image.png files/en-us/web/css/
```

3. Run `filecheck` on each image, which might complain if something's wrong.
For more details, see the [Compressing images](#compressing-images) section.
```sh
```bash
yarn filecheck files/en-us/web/css/my-cool-image.png
```
Expand All @@ -48,7 +48,7 @@ Let's walk through an example:
5. Add and commit all of the deleted, created, and modified files, as well as
push your branch to your fork:
```sh
```bash
git add files/en-us/web/css/my-cool-image.png files/en-us/web/css/index.html
git commit
git push -u origin my-images
Expand Down Expand Up @@ -101,7 +101,7 @@ You can compress an image appropriately by using the `filecheck` command with th
This option compresses the image as much as possible and replaces the original with the compressed version.
For example:

```sh
```bash
yarn filecheck files/en-us/web/css/my-cool-image.png --save-compression
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ On MDN, writers will use code fences for example code blocks. They must specify
- `md` - Markdown
- `latex` - LaTeX
- Command Prompts
- `sh` - Bash/Shell
- `bash` - Bash/Shell
- `batch` - Batch (Windows Shell)
- `powershell` - PowerShell
- Configuration/Data Files
Expand Down

0 comments on commit 2c66ef0

Please sign in to comment.