Skip to content

Commit

Permalink
Update info about versioning index files (#46309)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanpalm authored Nov 20, 2023
1 parent ad9263f commit bcbe49e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ versions:
ghes: '*'
```
You can also version a page for a range of releases. This would version the page for {% data variables.product.prodname_dotcom_the_website %}, and {% data variables.product.prodname_ghe_server %} versions 2.22 and 3.0 only:
You can also version a page for a range of releases. This would version the page for {% data variables.product.prodname_dotcom_the_website %}, and {% data variables.product.prodname_ghe_server %} versions 3.1 and 3.2 only:
```yaml
versions:
fpt: '*'
ghes: '>=2.22 <3.1'
ghes: '>=3.1 <3.3'
```
### `redirect_from`
Expand Down Expand Up @@ -303,7 +303,7 @@ When adding a new article, make sure the filename is a [kebab-cased](https://en.

## Index pages

Index pages are the Table of Contents files for the docs site. Every product, category, and map topic subdirectory has an `index.md` that serves as the landing page. Each `index.md` must contain a `children` frontmatter property with a list of relative links to the child pages of the product, category, or map topic.
Index pages are the table of contents files for the Docs site. Every product, category, and map topic subdirectory has an `index.md` file that provides an overview of the content and links to every child article. Each `index.md` must contain a `children` frontmatter property with a list of relative links to the child pages of the product, category, or map topic. Index pages require a `versions` frontmatter property, and the actual value will be computed at runtime based on the versions of children articles.

{% note %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ Versioning for {% data variables.product.prodname_ghe_managed %} uses the `githu

## Versioning in the YAML frontmatter

You can use the `versions` property within the file's frontmatter to define which products an entire page applies to. For example, the following YAML frontmatter will version an article for {% data variables.product.prodname_ghe_server %} 2.20 and above and Free, Pro, or Team.
You can use the `versions` property within a file's frontmatter to define which products an article will appear for. Index files require a `versions` property, but they will be automatically versioned based on the versions of their children.

For example, the following YAML frontmatter will version an article for {% data variables.product.prodname_ghe_server %} 2.20 and above and Free, Pro, or Team.

```yaml
title: About your personal dashboard
Expand All @@ -94,13 +96,13 @@ versions:
ghes: '*'
```

You can also version a page for a range of releases. The following example will version the page for {% data variables.product.prodname_dotcom_the_website %}, and {% data variables.product.prodname_ghe_server %} versions 2.22 and 3.0 only:
You can also version a page for a range of releases. The following example will version the page for {% data variables.product.prodname_dotcom_the_website %}, and {% data variables.product.prodname_ghe_server %} versions 3.1 and 3.2 only:

```yaml
versions:
fpt: '*'
ghec: '*'
ghes: '>=2.22 <3.1'
ghes: '>=3.1 <3.3'
```

## Versioning with Liquid conditional operators
Expand Down

0 comments on commit bcbe49e

Please sign in to comment.