From: Jukka Kurkela Date: Mon, 12 Apr 2021 21:18:02 +0000 (+0300) Subject: Docs: Update version menu title (#8887) X-Git-Tag: v3.1.1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95faa4f2a25016a8b680379288e853a639a1fe38;p=thirdparty%2FChart.js.git Docs: Update version menu title (#8887) --- diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 034bca7d1..65ba92892 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,6 +1,6 @@ const path = require('path'); const docsVersion = "VERSION"; -const base = process.env.NODE_ENV === "development" ? '' : `/docs/${docsVersion}/`; +const base = process.env.NODE_ENV === "development" ? '/docs/master/' : `/docs/${docsVersion}/`; module.exports = { title: 'Chart.js', @@ -43,9 +43,11 @@ module.exports = { ], ['@simonbrunel/vuepress-plugin-versions', { filters: { - suffix: (v) => v ? ` (${v})` : '' + suffix: (tag) => tag ? ` (${tag})` : '', + title: (v, vars) => window.location.href.includes('master') ? 'Development (master)' : v + (vars.tag ? ` (${tag})` : ''), }, menu: { + text: '{{version|title}}', items: [ { text: 'Documentation',