Use Docsify to serve a website view of the collated docs from @gasket/plugin-docs.
gasket create <app-name> --plugins @gasket/plugin-docs,@gasket/plugin-docsify
npm i @gasket/plugin-docs @gasket/plugin-docsify
Modify plugins
section of your gasket.config.js
:
module.exports = {
plugins: {
add: [
+ '@gasket/plugin-docs',
+ '@gasket/plugin-docsify'
]
}
}
Now, when you run npx gasket docs
in your app, a nice Docsify website will be
launched in your browser.
To be set in under docsify
in the gasket.config.js
.
theme
- (string) Name of the theme. Default isstyles/gasket.css
. Can be set to name of docsify themes, a URL, or CSS file.port
- (number) Port to serve the docs from. Default is3000
.config
- (object) Any Docsify config properties, expect for functions types which are not currently supported. Default hasauth2top
andrelativePath
set totrue
, withmaxLevel
at3
.stylesheets
(string[]) - Optional additional stylesheet URLs to load.scripts
(string[]) - Optional additional scripts files, which can include docsify plugins.
This example uses the dark
theme, and enables the Google Analytics plugin by
adding the script and config.
// gasket.config.js
module.exports = {
docsify: {
theme: 'dark',
config: {
ga: 'UA-XXXXX-Y'
},
scripts: [
'//unpkg.com/docsify/lib/plugins/ga.min.js'
]
}
}