How to draw in Vuepress?
[[toc]] Thank to the author of Using Chart.js with Vue.js [1]. Create a vue component. Change to directory of your vuepress project. For me: cd /Users/mac/Github/way2ml Install chart.js by using this command. npm install chart.js --save Create a Draw.vue file with following contents in directory doc/.vuepress/components/. <template> <div id="app"> <canvas id="planet-chart"></canvas> </div> </template> <script> import Chart from 'chart.js'; import planetChartData from './js/chart-data.js'; export default{ mounted() { this.createChart('planet-chart', this.planetChartData); }, data() { return { planetChartData: planetChartData, } }, methods:{ createChart(chartId, chartData) { const ctx = document....