From: Igor Lukanin Date: Mon, 18 Jul 2022 10:48:41 +0000 (+0400) Subject: Add a stale version warning + a link to the latest version of docs (#10446) X-Git-Tag: v3.8.1~9 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1ccafe7d8fe89deab98107eabc1f3879c6252152;p=thirdparty%2FChart.js.git Add a stale version warning + a link to the latest version of docs (#10446) * Add a stale version warning + a link to the latest version of docs * Update docs/.vuepress/config.js Co-authored-by: Jacco van den Berg * Shorten the warning * Revert master title * Revert master title Co-authored-by: Jacco van den Berg --- diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e4fb3c1d1..77d1d19d9 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 (master)' : + vars.tag === 'latest' ? 'Latest (' + v + ')' : + v + (vars.tag ? ` (${tag})` : '') + ' (outdated)'; + }, }, menu: { text: '{{version|title}}', @@ -57,6 +61,10 @@ module.exports = { text: 'Development (master)', link: '/docs/master/', }, + { + text: 'Latest version', + link: '/docs/latest/', + }, { type: 'versions', text: '{{version}}{{tag|suffix}}',