1
0
mirror of synced 2025-12-30 12:02:01 -05:00
Files
docs/data/features
Isaac Brown 1b298d2119 GitHub Enterprise Server 3.14 release candidate (#51664)
Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Rachael Rose Renk <91027132+rachaelrenk@users.noreply.github.com>
Co-authored-by: Pallavi <96553709+pallsama@users.noreply.github.com>
Co-authored-by: Casey Tucker <dctucker@github.com>
Co-authored-by: Hao Jiang <45571951+jianghao0718@users.noreply.github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Hirsch Singhal <1666363+hpsin@users.noreply.github.com>
Co-authored-by: docs-bot <77750099+docs-bot@users.noreply.github.com>
Co-authored-by: Florin Coada <coadaflorin@github.com>
Co-authored-by: Devin Dooley <dooleydevin@github.com>
Co-authored-by: Greg Padak <gpadak@github.com>
Co-authored-by: Taylor Reis <taylorreis@github.com>
Co-authored-by: Steve Guntrip <stevecat@github.com>
2024-08-07 22:50:44 +00:00
..
2023-03-09 10:28:07 +00:00
2024-02-19 16:15:12 +01:00
2021-10-27 07:47:17 -07:00
2022-06-08 12:26:37 +02:00
2023-09-22 10:46:46 +00:00
2022-01-21 18:04:18 +00:00

Feature-based versioning

Feature-based versioning allows us to define and control the versions of an arbitrarily named "feature" in one place.

Note: Do not delete data/features/placeholder.yml because it is used by tests.

How it works

Add a new YAML file with the feature name you want to use in this directory. For a feature named meow, that would be data/features/meow.yml.

Add a versions block to the YML file with the short names of the versions the feature is available in. For example:

versions:
  fpt: '*'
  ghec: '*'
  ghes: '>3.1'

The format and allowed values are the same as the frontmatter versions property.

Liquid conditionals

Now you can use {% ifversion meow %} ... {% endif %} in content files!

Frontmatter

You can also use the feature in frontmatter in content files:

versions:
  fpt: '*'
  ghec: '*'
  ghes: '>3.1'
  feature: 'meow'

You cannot use feature: to specify multiple concurrent versions, as this is not supported. Alternatively, you could create a new feature-based versioning file with the required versioning.

Schema enforcement

The schema for validating the feature versioning lives in src/data-directory/lib/data-schemas/features.js.

Script to remove feature tags

TBD!