Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 1.68 KB

File metadata and controls

69 lines (46 loc) · 1.68 KB

API Docs Plugin

Renders API reference documentation in VuePress

::: warning METADATA FORMAT This plugin currently requires that you have your API metadata information available in the TDoc specification. Other formats like JSDoc are not supported yet. :::

Installation

yarn add -D vuepress-plugin-apidocs
# OR npm i -D vuepress-plugin-apidocs

Usage

module.exports = {
  plugins: ['apidocs']
}

Passing Options

const path = require('path')

module.exports = context => ({
  plugins: ['apidocs', {
    metadataFile: 'metadata/api.json',
    disableStoreSetup: true
  }]
})

Options

metadataFile

Path to the metadata file. This path is resolved relative to the source directory you passed into the VuePress CLI.

  • Type: string
  • Default: api/api.json

versionedMetadataFile

Path to the metadata file in versioned docs. This path is resolved relative to the versionedSourceDir option.

  • Type: string
  • Default: api/api.json

versionedSourceDir

Path to the versioned docs directory. This only needs to be set when you change the option with the same name in the versioning plugin.

::: warning NOTE It is currently not possible to easily access options from other plugins, so make sure that both plugin options are in sync. :::

  • Type: string
  • Default: ${sourceDir}/../website/versioned_docs

disableStoreSetup

Disables automatic setup of the Vuex store. Set this to false if you want to use your own App Level Enhancements to configure the store.

  • Type: boolean
  • Default: false