Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version menu in documentation #8866

Merged
merged 6 commits into from Apr 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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: [
{
etimberg marked this conversation as resolved.
Show resolved Hide resolved
text: 'Development (master)',
link: '/docs/master/',
},
{
simonbrunel marked this conversation as resolved.
Show resolved Hide resolved
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',
simonbrunel marked this conversation as resolved.
Show resolved Hide resolved
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