Skip to content

Files

Latest commit

5dd92d0 · May 3, 2022

History

History
This branch is 26908 commits behind github/docs:main.

features

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 20, 2022
Mar 16, 2022
May 3, 2022
Mar 31, 2022
Dec 6, 2021
Apr 22, 2022
Mar 30, 2022
Apr 20, 2022
Feb 7, 2022
Feb 16, 2022
Feb 3, 2022
Apr 21, 2022
Apr 20, 2022
Oct 27, 2021
Apr 20, 2022
Apr 13, 2022
Feb 15, 2022
Apr 20, 2022
Apr 14, 2022
Mar 2, 2022
Jan 21, 2022
Jan 5, 2022
Mar 21, 2022
Apr 22, 2022
Apr 20, 2022
Feb 23, 2022
Jan 21, 2022
Apr 7, 2022
Dec 6, 2021
Mar 17, 2022
Jan 16, 2022
Apr 20, 2022
Oct 15, 2021
Mar 3, 2022
Apr 8, 2022
Feb 17, 2022
Mar 15, 2022
Mar 2, 2022
Mar 7, 2022
Mar 16, 2022
Mar 10, 2022
Apr 4, 2022
Apr 8, 2022
Apr 25, 2022
Mar 22, 2022
Oct 20, 2021
Jan 27, 2022
Jan 21, 2022

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 {% if meow %} ... {% endif %} in content files! Note this is the if tag, not the new ifversion tag.

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-files.js.

Script to remove feature tags

TBD!