1
0
mirror of synced 2025-12-25 11:03:37 -05:00
Files
docs/data/features
mc d328effc2b [Already shipped] -Dependabot alerts: surface information about development dependencies - [GA] (#28615)
* made a start

* hmm hmm

* more work

* Optimize images

* improvements

* make table easier to read

* Apply suggestions from code review

Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>

* address review comments

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
2022-06-30 07:53:12 +00:00
..
2022-04-21 11:17:29 +00:00
2021-10-27 07:47:17 -07:00
2022-06-08 12:26:37 +02:00
2022-05-24 16:27:30 +00:00
2022-04-20 10:37:33 +02:00
2021-10-15 15:41:33 -05:00
2022-03-03 13:43:47 +00:00
2022-06-07 08:04:12 +01:00
2022-05-10 10:59:58 -05: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: '*'
  ghes: '>3.1'
  ghae: '*'

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: '*'
  ghes: '>3.1'
  feature: 'meow'

If you want a content file to apply to more than one feature, you can do this:

versions:
  fpt: '*'
  ghes: '>3.1'
  feature: ['meow', 'blorp']

Schema enforcement

The schema for validating the feature versioning lives in tests/helpers/schemas/feature-versions-schema.js and is exercised by tests/linting/lint-versioning.js.

Script to remove feature tags

TBD!