Skip to content

Commit 977d560

Browse files
julien-deramondmdo
authored andcommitted
Docs: enhance versions page to identify 5.3 as latest
1 parent da8d86c commit 977d560

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

site/data/docs-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757

5858
- group: v6.x
5959
baseurl: 'https://getbootstrap.com/docs'
60-
description: 'Upcoming major release. First release will be v6.0.0-alpha1.'
60+
description: 'Upcoming major release. First release is v6.0.0-alpha1.'
6161
versions:
6262
- '6.0'

site/src/pages/docs/versions.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@ function getVersionsSortedDesc<TKey extends string, TVersions extends Record<TKe
2929
.slice()
3030
.sort((a, b) => b.localeCompare(a))
3131
.map((version) => {
32-
const isCurrentVersion = version === getConfig().docs_version
32+
// TODO: revert to getConfig().docs_version once we have v6.0.0 released
33+
// const isCurrentVersion = version === getConfig().docs_version
34+
const isCurrentVersion = version === '5.3'
35+
const isAlpha = version === '6.0'
3336

3437
return (
3538
<a
3639
class:list={[
3740
'list-group-item list-group-item-action py-2 text-primary',
38-
isCurrentVersion && 'd-flex justify-content-between align-items-center'
41+
(isCurrentVersion || isAlpha) && 'd-flex justify-content-between align-items-center'
3942
]}
4043
href={`${docsVersion.baseurl}/${version}/`}
4144
>
4245
{version}
4346
{isCurrentVersion && <span class="badge text-bg-primary">Latest</span>}
47+
{isAlpha && <span class="badge text-bg-warning">Alpha</span>}
4448
</a>
4549
)
4650
})}

0 commit comments

Comments
 (0)