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 3 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
35 changes: 35 additions & 0 deletions docs/.vuepress/config.js
Expand Up @@ -41,6 +41,41 @@ module.exports = {
},
},
],
['@simonbrunel/vuepress-plugin-versions', {
filters: 'version-filters.js',
kurkle marked this conversation as resolved.
Show resolved Hide resolved
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]\\.',
kurkle marked this conversation as resolved.
Show resolved Hide resolved
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
5 changes: 5 additions & 0 deletions docs/.vuepress/version-filters.js
@@ -0,0 +1,5 @@
export default {
suffix(value) {
return value ? ` (${value})` : '';
},
};
21 changes: 21 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": "git+https://github.com/simonbrunel/vuepress-plugin-versions.git",
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"@vuepress/plugin-google-analytics": "1.8.2",
Expand Down