You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/instructions/content.instructions.md
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,3 +92,61 @@ Examples:
92
92
* ❌ Incorrect: "The cat – which sat on a branch – smiled with a broad grin." (en dash with spaces)
93
93
* ❌ Incorrect: "The cat-which sat on a branch-smiled with a broad grin." (hyphen without spaces)
94
94
* ❌ Incorrect: "The cat - which sat on a branch - smiled with a broad grin." (hyphen with spaces)
95
+
96
+
## Versioning
97
+
98
+
Avoid `{% ifversion fpt %}`, `{% ifversion ghec %}`, and `{% ifversion fpt or ghec %}` in content files whenever possible. Instead of suggesting or adding version-gating within an article:
99
+
100
+
* Write content that applies to all versions the article is versioned for
101
+
* If content is truly version-specific, consider whether it is low-harm to show it to all readers (e.g., an enterprise-only row in a reference table)
102
+
* Only use `{% ifversion %}` as a last resort when content would be actively misleading for readers on a different version
103
+
104
+
**FPT and GHEC content**: When dotcom content applies to both products, version the page for `fpt` and `ghec` in the frontmatter. Do NOT use in-article Liquid versioning. Do NOT suggest adding `{% ifversion fpt or ghec %}` blocks as a fix for content that mentions a dotcom-only feature. Instead, suggest rewriting the content using the alternatives to inline versioning options listed below.
105
+
106
+
**GHES content**: If versioning is necessary for GitHub Enterprise Server content, use feature-based versioning (FBV). GHES content should rely on feature flags defined in `data/features/` rather than inline `{% ifversion ghes %}` blocks. Feature flags allow centralized control of when content appears for specific GHES releases.
107
+
108
+
### Alternatives to inline versioning
109
+
110
+
Before resorting to in-article versioning, first consider whether the content is actually different across versions. Often procedures can be simplified to work at both levels.
111
+
112
+
Use these strategies instead of `{% ifversion %}`, depending on the level of content:
113
+
114
+
**At the article level:**
115
+
116
+
* When the feature is only available in certain products, use the "Who can use this feature?" box to convey that the content of the article applies only to specific products
117
+
* When an article only exists because the functionality is only available in older GHES releases (and not on {% data variables.product.prodname_dotcom_the_website %} or newer GHES releases), just remove that article
118
+
119
+
**At the heading level:**
120
+
121
+
* Use prose similar to "Who can use this feature?" to convey that the content of a section applies only to specific products
122
+
123
+
**At the paragraph or sentence level:**
124
+
125
+
* If you're briefly introducing a feature and then linking to an article, there's no need to specify versioning. Let readers learn availability when they follow the link, via the "Who can use this feature?" box
126
+
* When necessary, start sentences with "With {% data variables.product.prodname_ghe_cloud %}...", "On {% data variables.product.prodname_dotcom_the_website %}...", etc.
127
+
* End list items with "({% data variables.product.prodname_ghe_cloud %} only)", "({% data variables.product.prodname_dotcom_the_website %} only)", etc.
128
+
* Specify if the feature is not available for GHES with "NAME-OF-FEATURE is not available for {% data variables.product.prodname_ghe_server %}", "... (not available in {% data variables.product.prodname_ghe_server %})", etc.
129
+
130
+
### Example
131
+
132
+
When documenting a feature that only applies to dotcom (not GHES):
133
+
134
+
❌ Don't wrap content in version blocks:
135
+
136
+
```markdown
137
+
{% ifversion fpt or ghec %}
138
+
139
+
## Immutable subject claims
140
+
141
+
Repositories created after July 15, 2026 now use an immutable default subject format.
142
+
143
+
{% endif %}
144
+
```
145
+
146
+
✅ Do use prose to indicate availability:
147
+
148
+
```markdown
149
+
## Immutable subject claims
150
+
151
+
Repositories created after July 15, 2026 now use an immutable default subject format. This rollout does not include {% data variables.product.prodname_ghe_server %}.
Copied to this repo by the [$GITHUB_WORKFLOW workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)." --repo github/docs-content --label "workflow-generated")"
Copy file name to clipboardExpand all lines: .github/workflows/generate-code-scanning-query-lists.yml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -259,4 +259,6 @@ jobs:
259
259
No action is required from the first responder for the Docs content team. This PR is automatically added to the Docs content review board. Any writer can review this by checking that the PR looks sensible. If CI does not pass or other problems arise, contact #docs-engineering on slack.
260
260
261
261
262
-
When the DRI for the CodeQL CLI release is ready to publish, they will ask us to merge this PR in #docs-content.'
262
+
When the DRI for the CodeQL CLI release is ready to publish, they will ask us to merge this PR in #docs-content.
263
+
264
+
_Generated by the [Generate code scanning query lists](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run._'
Copy file name to clipboardExpand all lines: .github/workflows/orphaned-files-check.yml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,8 @@ jobs:
98
98
If you are the first responder, please spot check some of the unused assets to make sure they aren't referenced anywhere. Then, approve and merge the pull request.
99
99
100
100
For more information, see [Doc: Orphaned Assets](https://github.com/github/docs-engineering/blob/main/docs/orphaned-assets.md) and [Doc: Reusables CLI](https://github.com/github/docs-internal/tree/main/src/content-render/scripts/reusables-cli).
101
+
102
+
Generated by the [orphaned files workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID).
0 commit comments