1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

feat(documentation): change docs to use LTS/STS instead of version number (#357)

This commit is contained in:
James Player 2025-02-03 11:17:36 +13:00 committed by GitHub
parent 17a4750d8e
commit e943aa8f03

View file

@ -40,17 +40,10 @@ export function useDocsUrl(doc?: string): string {
} }
let url = 'https://docs.portainer.io/'; let url = 'https://docs.portainer.io/';
if (versionQuery.data) {
let { ServerVersion } = versionQuery.data;
if (ServerVersion[0] === 'v') {
ServerVersion = ServerVersion.substring(1);
}
const parts = ServerVersion.split('.'); // Add LTS or STS version if we have it
if (parts.length >= 2) { if (versionQuery.data?.VersionSupport) {
const version = parts.slice(0, 2).join('.'); url += versionQuery.data.VersionSupport.toLowerCase();
url += `v/${version}`;
}
} }
if (doc) { if (doc) {