Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,14 @@ For longer strings, we use reusables, and for shorter strings, we use variables.

## Table pipes

Every row of a table in the {% data variables.product.prodname_docs %} must start and end with a pipe, `|`.
Every row of a table in the {% data variables.product.prodname_docs %} must start and end with a pipe, `|`, even rows that contain only Liquid versioning.

```markdown
| Where is the table located? | Does every row end with a pipe? |
| --- | --- |
| {% raw %}{% ifversion some-cool-feature %}{% endraw %} |
| GitHub Docs | Yes |
| {% raw %}{% endif %}{% endraw %} |
```

## Table row headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,34 +157,30 @@ Do not use the operators `&&` or `||`. Liquid does not recognize them, and the c

### Whitespace control

When using Liquid conditionals in lists or tables, you can use [whitespace control](https://shopify.github.io/liquid/basics/whitespace/) characters to prevent the addition of newlines and other whitespace that would break the list or table rendering.
When using Liquid conditionals in lists, you can use [whitespace control](https://shopify.github.io/liquid/basics/whitespace/) characters to prevent the addition of newlines and other whitespace that would break the list rendering.

You can add a hyphen (`-`) on either the left, right, or both sides to indicate that there should be no newline or other whitespace on that side.

```text
{% raw %}{%- ifversion fpt %}{% endraw %}
```

For example, to version a table row, instead of adding liquid versioning for the row starting at the end of the previous row, like this:
For example, to version one step of a procedure, instead of adding liquid versioning for the step starting at the end of the previous step, like this:

```markdown
Column A | Column B | Column C
---------|----------|---------
This row is for all versions | B1 | C1{% raw %}{% ifversion ghes %}{% endraw %}
This row is for GHES only | B2 | C2{% raw %}{% endif %}{% endraw %}
This row is for all versions | B3 | C3
1. This step is for all versions{% raw %}{% ifversion ghes %}{% endraw %}
1. This step is for GHES only{% raw %}{% endif %}{% endraw %}
1. This step is for all versions
```

You can include the liquid versioning on its own line and use whitespace control to strip the newline to the left of the liquid tag. This makes reading the source much easier, without breaking the rendering of the table:
You can include the liquid versioning on its own line and use whitespace control to strip the newline to the left of the liquid tag. This makes reading the source much easier, without breaking the rendering of the list:

```markdown
Column A | Column B | Column C
---------|----------|---------
This row is for all versions | B1 | C1
1. This step is for all versions
{% raw %}{%- ifversion ghes %}{% endraw %}
This row is for GHES only | B2 | C2
1. This step is for GHES only
{% raw %}{%- endif %}{% endraw %}
This row is for all versions | B3 | C3
1. This row is for all versions
```

## About feature-based versioning
Expand Down