Skip to content

Commit

Permalink
Update liquid-helpers.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shati-patel authored Feb 12, 2021
1 parent 098b69a commit 7586a53
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions contributing/liquid-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ If your content is describing a new feature that was added to GitHub.com and wil
In this example:

- `if currentVersion == "free-pro-team@latest"` will include the content for GitHub.com output.
- `or currentVersion ver_gt "[email protected]"` will include the content for releases *after* Enterprise 2.21, which means the content will be included for 2.7+.
- `or currentVersion ver_gt "[email protected]"` will include the content for releases *after* Enterprise 2.21, which means the content will be included for 2.22+.
- `{% endif %}` ends the statement.

#### Including content for *changed* Dotcom features that will also change in Enterprise

If your content is describing a change to existing functionality in Dotcom, such as changed UI text or a more simple means of completing a task, use this logic:

```
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "2.20" %}This is the new way of doing things {% else %}This is the old way of doing things {% endif %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.20" %}This is the new way of doing things {% else %}This is the old way of doing things {% endif %}
```

In this example:
Expand All @@ -115,12 +115,11 @@ In this example:
If your content is describing a change to existing functionality in Dotcom, and that functionality doesn't exist in all older Enterprise versions, use logic like this:

```
{% if currentVersion == 'dotcom' or currentVersion ver_gt "2.20" %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.20" %}
This is the new way of doing things.
{% endif %}
{% if currentVersion ver_gt "[email protected]" and currentVersion ver_lt "2.21" %}
{% elsif currentVersion ver_gt "[email protected]" and currentVersion ver_lt "[email protected]" %}
This is the old way of doing things (which did not exist before 2.20).
Expand All @@ -130,8 +129,8 @@ This is the old way of doing things (which did not exist before 2.20).
In this example:

- `if currentVersion == "free-pro-team@latest"` will include the content for GitHub.com output.
- `or currentVersion ver_gt "2.20"` will include the content for releases *after* Enterprise 2.20, which means the content will be included for 2.21+.
- `elsif currentVersion ver_gt "[email protected]" and currentVersion ver_lt "2.21"` means if the above is NOT true, and the version is 2.20, then display the content that follows, `This is the old way of doing things`. No content will be displayed for versions older than 2.20.
- `or currentVersion ver_gt "enterprise-server@2.20"` will include the content for releases *after* Enterprise 2.20, which means the content will be included for 2.21+.
- `elsif currentVersion ver_gt "[email protected]" and currentVersion ver_lt "enterprise-server@2.21"` means if the above is NOT true, and the version is 2.20, then display the content that follows, `This is the old way of doing things`. No content will be displayed for versions older than 2.20.
- `{% endif %}` ends the statement.

#### Including content for *new Enterprise features* that don't exist on Dotcom
Expand Down

0 comments on commit 7586a53

Please sign in to comment.