From 302107ddaedde12e5025bab8f5669ed6e4cbafd6 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Tue, 28 Jun 2022 20:12:56 +0400 Subject: [PATCH 1/5] Add a stale version warning + a link to the latest version of docs --- docs/.vuepress/config.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e4fb3c1d188..69d1606305d 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -45,7 +45,11 @@ module.exports = { ['@simonbrunel/vuepress-plugin-versions', { filters: { suffix: (tag) => tag ? ` (${tag})` : '', - title: (v, vars) => window.location.href.includes('master') ? 'Development (master)' : v + (vars.tag ? ` (${tag})` : ''), + title: (v, vars) => { + return window.location.href.includes('master') ? 'Development version' : + window.location.href.includes('latest') ? 'Latest version' : + v + (vars.tag ? ` (${tag})` : '') + ' (consider checking the latest version)'; + }, }, menu: { text: '{{version|title}}', @@ -54,9 +58,13 @@ module.exports = { text: 'Documentation', items: [ { - text: 'Development (master)', + text: 'Development version', link: '/docs/master/', }, + { + text: 'Latest version', + link: '/docs/latest/', + }, { type: 'versions', text: '{{version}}{{tag|suffix}}', From 67e4d7cadee0e6fdb406c69f150d1b164e009605 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Tue, 28 Jun 2022 22:43:26 +0400 Subject: [PATCH 2/5] Update docs/.vuepress/config.js Co-authored-by: Jacco van den Berg --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 69d1606305d..ec3999c81cb 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -47,7 +47,7 @@ module.exports = { suffix: (tag) => tag ? ` (${tag})` : '', title: (v, vars) => { return window.location.href.includes('master') ? 'Development version' : - window.location.href.includes('latest') ? 'Latest version' : + vars.tag === 'latest' ? 'Latest version' : v + (vars.tag ? ` (${tag})` : '') + ' (consider checking the latest version)'; }, }, From 8aa3049e67709625058f8f7bc7caa5ac19641f97 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Tue, 28 Jun 2022 22:44:25 +0400 Subject: [PATCH 3/5] Shorten the warning --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ec3999c81cb..fd63d172b33 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -48,7 +48,7 @@ module.exports = { title: (v, vars) => { return window.location.href.includes('master') ? 'Development version' : vars.tag === 'latest' ? 'Latest version' : - v + (vars.tag ? ` (${tag})` : '') + ' (consider checking the latest version)'; + v + (vars.tag ? ` (${tag})` : '') + ' (outdated)'; }, }, menu: { From bac69b4556f6bb054a85066159a4ca25edaebe61 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Tue, 28 Jun 2022 22:45:30 +0400 Subject: [PATCH 4/5] Revert master title --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index fd63d172b33..36cf4d5b4f0 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -58,7 +58,7 @@ module.exports = { text: 'Documentation', items: [ { - text: 'Development version', + text: 'Development (master)', link: '/docs/master/', }, { From 3bdad1e94ada01144d7140bd7ea6d4f1ec5130ce Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Tue, 28 Jun 2022 22:59:17 +0400 Subject: [PATCH 5/5] Revert master title --- docs/.vuepress/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 36cf4d5b4f0..77d1d19d971 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -46,8 +46,8 @@ module.exports = { filters: { suffix: (tag) => tag ? ` (${tag})` : '', title: (v, vars) => { - return window.location.href.includes('master') ? 'Development version' : - vars.tag === 'latest' ? 'Latest version' : + return window.location.href.includes('master') ? 'Development (master)' : + vars.tag === 'latest' ? 'Latest (' + v + ')' : v + (vars.tag ? ` (${tag})` : '') + ' (outdated)'; }, },