]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Docs: Update version menu title (#8887)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Mon, 12 Apr 2021 21:18:02 +0000 (00:18 +0300)
committerGitHub <noreply@github.com>
Mon, 12 Apr 2021 21:18:02 +0000 (17:18 -0400)
docs/.vuepress/config.js

index 034bca7d18e673a3a287e37a683753ca1c67afb5..65ba928922e131cc55f8182141df403a82ffe804 100644 (file)
@@ -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',