Skip to content

Commit

Permalink
docs: make v12 the last version and redirect /v12 routes to / (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Sep 18, 2024
1 parent 3f2fa13 commit 33c0084
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions docusaurus/react-docusaurus-dontent-docs.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ module.exports = {
[
'@docusaurus/plugin-content-docs',
{
lastVersion: '11.x.x',
lastVersion: 'current',
versions: {
current: {
banner: 'unreleased',
label: 'v12 (rc)',
path: 'v12',
label: 'v12',
},
'11.x.x': {
label: 'v11',
path: 'v11',
},
'11.x.x-legacy': {
label: 'v11 (legacy)',
Expand All @@ -21,5 +20,19 @@ module.exports = {
},
},
],
[
'@docusaurus/plugin-client-redirects',
{
createRedirects(existingPath) {
// we need to replace /v12 in the path to the current version as v12 was previously rc
const replacedToken = '/v12';
if (existingPath.includes(replacedToken)) {
// Redirect from /v12/X to /
return [existingPath.replace('/', replacedToken)];
}
return undefined; // Return a falsy value: no redirect created
},
},
],
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The `str-chat` class is applied to the [channel list](../components/ChannelListC
<SDKSpecific name="react">

:::note
The `str-chat` class is applied to the [`ChannelList`](../core-components/channel-list.mdx) and [`Channel`](../core-components/channel.mdx) components, all CSS variables are declared on this level.
The `str-chat` class is applied to the [`ChannelList`](../components/core-components/channel-list.mdx) and [`Channel`](../core-components/channel.mdx) components, all CSS variables are declared on this level.
:::

</SDKSpecific>
Expand Down

0 comments on commit 33c0084

Please sign in to comment.