Skip to content

Commit

Permalink
Add version menu in documentation (#8866)
Browse files Browse the repository at this point in the history
* Add version menu in documentation
* Use filters for tags
* Use limit
* Update
* Use released plugin
* use published version
  • Loading branch information
kurkle committed Apr 10, 2021
1 parent f8885ce commit 05ba2ee
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/.vuepress/config.js
Expand Up @@ -41,6 +41,43 @@ module.exports = {
},
},
],
['@simonbrunel/vuepress-plugin-versions', {
filters: {
suffix: (v) => v ? ` (${v})` : ''
},
menu: {
items: [
{
text: 'Documentation',
items: [
{
text: 'Development (master)',
link: '/docs/master/',
},
{
type: 'versions',
text: '{{version}}{{tag|suffix}}',
link: '/docs/{{version}}/',
exclude: /^[01]\.|2\.[0-5]\./,
group: 'minor',
}
]
},
{
text: 'Release notes (5 latest)',
items: [
{
type: 'versions',
limit: 5,
target: '_blank',
group: 'patch',
link: 'https://github.com/chartjs/Chart.js/releases/tag/v{{version}}'
}
]
}
]
},
}],
],
chainWebpack(config) {
config.merge({
Expand Down
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -54,6 +54,7 @@
"@rollup/plugin-inject": "^4.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@simonbrunel/vuepress-plugin-versions": "^0.1.0",
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"@vuepress/plugin-google-analytics": "1.8.2",
Expand Down

0 comments on commit 05ba2ee

Please sign in to comment.