Skip to content

Commit

Permalink
document use of {% raw %} (github#22216)
Browse files Browse the repository at this point in the history
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
  • Loading branch information
skedwards88 and mchammer01 authored Oct 20, 2021
1 parent 836b00d commit b0c5e2f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contributing/content-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ Keep lines in code samples to about 60 characters, to avoid requiring readers to
Within code blocks:
- Do not use markup before the command output.
- Only use `$` before the command itself if you’re showing the command’s output in the same block.
- If your code example includes `{` or `}` that should render, wrap that section in `{% raw %}` `{% endraw %}` to disable Liquid processing for that section.
- **Use**:

```
GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
```
- **Avoid**:
```
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### Commands
Expand Down
16 changes: 16 additions & 0 deletions contributing/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,19 @@ During development, you can visit any page on `http://localhost:4000` and add `?
| `redirect_from` | Shows the hardcoded redirects in the [`redirect_from` frontmatter](content#redirect_from).
| `redirects` | Shows all redirects that the site is generating for the page.
| `includesPlatformSpecificContent` | Shows whether the site detects any [platform-specific content](#operating-system-tags) on the page.

## Liquid processing

If your text or code example includes `{` or `}` that should render, you need to wrap it in `{% raw %}` `{% endraw %}` to disable Liquid processing for that section. For example:

- **Use**:

```
GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
```

- **Avoid**:

```
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

0 comments on commit b0c5e2f

Please sign in to comment.