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:
parent
17a4750d8e
commit
e943aa8f03
1 changed files with 3 additions and 10 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue