Generate API docs with vuepress-plugin-typedoc (#8755)

* Generate API docs with vuepress-plugin-typedoc

* Links, fixes, cleanup
This commit is contained in:
Jukka Kurkela
2021-03-30 23:19:59 +03:00
committed by GitHub
parent 4b7b3f277f
commit 93e07ebb48
10 changed files with 42 additions and 10 deletions

View File

@@ -19,6 +19,19 @@ module.exports = {
'ga': 'UA-28909194-3'
}
],
[
'vuepress-plugin-typedoc',
{
entryPoints: ['../../types/index.esm.d.ts'],
hideInPageTOC: true,
tsconfig: '../../tsconfig.json',
sidebar: {
fullNames: true,
parentCategory: 'API',
},
},
],
],
chainWebpack(config) {
config.merge({
@@ -49,6 +62,7 @@ module.exports = {
},
nav: [
{text: 'Home', link: '/'},
{text: 'API', link: '/api/'},
// TODO: Make local when samples moved to vuepress
{text: 'Samples', link: `https://www.chartjs.org/samples/${docsVersion}/`},
{
@@ -62,6 +76,9 @@ module.exports = {
}
],
sidebar: {
'/api/': {
title: 'API'
},
'/': [
'',
{
@@ -148,7 +165,7 @@ module.exports = {
children: [
'developers/',
'developers/api',
[`https://chartjs.org/docs/${docsVersion}/typedoc/`, 'TypeDoc'],
['api/', 'TypeDoc'],
'developers/updates',
'developers/plugins',
'developers/charts',

View File

@@ -122,7 +122,7 @@ var chart = new Chart(ctx, {
## Plugin Core API
Read more about the [existing plugin extension hooks](https://github.com/chartjs/Chart.js/blob/master/types/index.esm.d.ts).
Read more about the [existing plugin extension hooks](../api/interfaces/plugin).
### Chart Initialization