diff --git a/doc/shortcodes.md b/doc/shortcodes.md index c34110b234618c562f4070904370406b3960f937..6d8aced04df85fe77bce51027dc6f17d25ea75f5 100644 --- a/doc/shortcodes.md +++ b/doc/shortcodes.md @@ -150,3 +150,11 @@ Look at this box! {{< /tabs >}} ``` + +## Maintained versions + +[Maintained versions](https://docs.gitlab.com/development/documentation/styleguide/availability_details/#maintained-versions) + +```plaintext +{{< maintained-versions >}} +``` diff --git a/themes/gitlab-docs/layouts/shortcodes/maintained-versions.html b/themes/gitlab-docs/layouts/shortcodes/maintained-versions.html new file mode 100644 index 0000000000000000000000000000000000000000..9b601580e43f06ddd794b4ff3a8ab0a6782f890b --- /dev/null +++ b/themes/gitlab-docs/layouts/shortcodes/maintained-versions.html @@ -0,0 +1,15 @@ +{{ $isPreRelease := partial "functions/is-pre-release-version.html" . }} +{{- if (eq $isPreRelease "true") -}} +{{ $releasesContent := readFile "content/versions.json" }} +{{ $releasesData := $releasesContent | transform.Unmarshal }} +{{ $releases := index $releasesData 0 }} + + +{{ else }} +https://docs.gitlab.com/policy/maintenance/#maintained-versions +{{ end }}