diff --git a/book.json b/book.json deleted file mode 100644 index 8b0f73970df..00000000000 --- a/book.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "root": "./docs", - "title": "Chart.js documentation", - "author": "chartjs", - "gitbook": "3.2.2", - "plugins": ["-lunr", "-search", "search-plus", "anchorjs", "chartjs", "ga"], - "pluginsConfig": { - "anchorjs": { - "icon": "#", - "placement": "left", - "visible": "always" - }, - "ga": { - "token": "UA-28909194-3", - "configuration": "auto" - }, - "theme-default": { - "showLevel": false, - "styles": { - "website": "style.css" - } - } - } -} diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js new file mode 100644 index 00000000000..6e2f1aa83f2 --- /dev/null +++ b/docs/.vuepress/config.js @@ -0,0 +1,114 @@ +module.exports = { + title: 'Chart.js documentation', + dest: './dist', + ga: 'UA-28909194-3', + head: [ + ['link', { rel: 'icon', href: `/favicon.ico` }], + ], + themeConfig: { + repo: 'chartjs/Chart.js', + lastUpdated: 'Last Updated', + editLinks: true, + docsDir: 'docs', + nav: [ + { text: 'Home', link: '/' }, + { text: 'Guide', link: '/docs/' }, + { text: 'Samples', link: '/samples/' } + ], + sidebar: [ + { + title: 'Getting Started', + collapsable: false, + children: [ + '/getting-started/', + '/getting-started/installation', + '/getting-started/integration' + ] + }, + { + title: 'General', + collapsable: false, + children: [ + '/general/', + '/general/accessibility', + '/general/responsive', + '/general/device-pixel-ratio', + '/general/interactions/', + '/general/interactions/events', + '/general/interactions/modes', + '/general/options', + '/general/colors', + '/general/fonts' + ] + }, + { + title: 'Configuration', + collapsable: false, + children: [ + '/configuration/', + '/configuration/animations', + '/configuration/layout', + '/configuration/legend', + '/configuration/title', + '/configuration/tooltip', + '/configuration/elements' + ] + }, + { + title: 'Charts', + collapsable: false, + children: [ + '/charts/', + '/charts/line', + '/charts/bar', + '/charts/radar', + '/charts/doughnut', + '/charts/polar', + '/charts/bubble', + '/charts/scatter', + '/charts/area', + '/charts/mixed' + ] + }, + { + title: 'Axes', + collapsable: false, + children: [ + '/axes/', + '/axes/cartesian/', + '/axes/cartesian/category', + '/axes/cartesian/linear', + '/axes/cartesian/logarithmic', + '/axes/cartesian/time', + '/axes/radial/', + '/axes/radial/linear', + '/axes/labelling', + '/axes/styling' + ] + }, + { + title: 'Developers', + collapsable: false, + children: [ + '/developers/', + '/developers/api', + '/developers/updates', + '/developers/plugins', + '/developers/charts', + '/developers/axes', + '/developers/contributing' + ] + }, + { + title: 'Additional Notes', + collapsable: false, + children: [ + '/notes/', + '/notes/comparison', + '/notes/extensions', + '/notes/license' + ] + } + ] + } +} diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md deleted file mode 100644 index 15265bd2b5a..00000000000 --- a/docs/SUMMARY.md +++ /dev/null @@ -1,55 +0,0 @@ -# Summary - -* [Chart.js](README.md) -* [Getting Started](getting-started/README.md) - * [Installation](getting-started/installation.md) - * [Integration](getting-started/integration.md) - * [Usage](getting-started/usage.md) -* [General](general/README.md) - * [Accessibility](general/accessibility.md) - * [Responsive](general/responsive.md) - * [Pixel Ratio](general/device-pixel-ratio.md) - * [Interactions](general/interactions/README.md) - * [Events](general/interactions/events.md) - * [Modes](general/interactions/modes.md) - * [Options](general/options.md) - * [Colors](general/colors.md) - * [Fonts](general/fonts.md) -* [Configuration](configuration/README.md) - * [Animations](configuration/animations.md) - * [Layout](configuration/layout.md) - * [Legend](configuration/legend.md) - * [Title](configuration/title.md) - * [Tooltip](configuration/tooltip.md) - * [Elements](configuration/elements.md) -* [Charts](charts/README.md) - * [Line](charts/line.md) - * [Bar](charts/bar.md) - * [Radar](charts/radar.md) - * [Doughnut & Pie](charts/doughnut.md) - * [Polar Area](charts/polar.md) - * [Bubble](charts/bubble.md) - * [Scatter](charts/scatter.md) - * [Area](charts/area.md) - * [Mixed](charts/mixed.md) -* [Axes](axes/README.md) - * [Cartesian](axes/cartesian/README.md) - * [Category](axes/cartesian/category.md) - * [Linear](axes/cartesian/linear.md) - * [Logarithmic](axes/cartesian/logarithmic.md) - * [Time](axes/cartesian/time.md) - * [Radial](axes/radial/README.md) - * [Linear](axes/radial/linear.md) - * [Labelling](axes/labelling.md) - * [Styling](axes/styling.md) -* [Developers](developers/README.md) - * [Chart.js API](developers/api.md) - * [Updating Charts](developers/updates.md) - * [Plugins](developers/plugins.md) - * [New Charts](developers/charts.md) - * [New Axes](developers/axes.md) - * [Contributing](developers/contributing.md) -* [Additional Notes](notes/README.md) - * [Comparison Table](notes/comparison.md) - * [Popular Extensions](notes/extensions.md) - * [License](notes/license.md) diff --git a/gulpfile.js b/gulpfile.js index 7a5cec8c1b6..30484a32754 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -44,7 +44,7 @@ function run(bin, args, done) { return new Promise(function(resolve, reject) { var exe = '"' + process.execPath + '"'; var src = require.resolve(bin); - var ps = exec([exe, src].concat(args || []).join(' ')); + var ps = exec([exe, src].concat(args || []).join(' '), { cwd: '.' }); ps.stdout.pipe(process.stdout); ps.stderr.pipe(process.stderr); @@ -134,12 +134,11 @@ function lintHtmlTask() { })); } -function docsTask() { - var bin = 'gitbook-cli/bin/gitbook.js'; - var cmd = argv.watch ? 'serve' : 'build'; +function docsTask(done) { + var bin = 'vuepress/bin/vuepress.js'; + var cmd = argv.watch ? 'dev' : 'build'; - return run(bin, ['install', './']) - .then(() => run(bin, [cmd, './', './dist/docs'])); + return run(bin, [cmd, 'docs']); } function unittestTask(done) { diff --git a/package.json b/package.json index bf913bf0aee..e8b4446a2aa 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,15 @@ "bugs": { "url": "https://github.com/chartjs/Chart.js/issues" }, + "scripts": { + "docs:dev": "vuepress dev docs", + "docs:build": "vuepress build docs" + }, "devDependencies": { "coveralls": "^3.0.0", "eslint": "^5.9.0", "eslint-config-chartjs": "^0.1.0", "eslint-plugin-html": "^5.0.0", - "gitbook-cli": "^2.3.2", "gulp": "^4.0.0", "gulp-eslint": "^5.0.0", "gulp-file": "^0.4.0", @@ -54,6 +57,7 @@ "rollup-plugin-istanbul": "^2.0.1", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-terser": "^3.0.0", + "vuepress": "^0.14.5", "watchify": "^3.9.0", "yargs": "^12.0.5" },