зеркало из https://github.com/github/docs.git
document use of {% raw %} (#22216)
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
Родитель
836b00d6cd
Коммит
b0c5e2fcca
|
@ -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
|
||||
|
||||
|
|
|
@ -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 }}
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче