Docusaurus tools plugin
An easy way to index and route tools on your docusaurus page.
Introduction
You can specify one of your components folders to be your tools folder. Inside that folder you can
create 1 folder per tool, that exposes a React component through its index.ts
. Each tool will
generate each own page. Links will be indexed on the tools main page.
See it in action on Takken.io.
Setup
Install dependencies
Choose one:
# NPM
npm install dotenv docusaurus-plugin-content-tools
# Yarn
yarn add dotenv docusaurus-plugin-content-tools
Configure
docusaurus.config.js
const config = {
// Configure plugin
plugins: [
[
'docusaurus-plugin-content-tools',
{
enabled: true,
verbose: true,
toolsFolder: '@site/src/components/pages/Tools',
},
],
],
// Configure navbar
themeConfig: {
navbar: {
items: [{ to: '/tools', label: 'Tools', position: 'left' }],
},
},
}
Options
enabled
Whether this plugin is enabled.
required: false
default: true
verbose
Gives output about retrieving the tools during build time
required: false
default: false
toolsFolder
The folder that you mark as your tools-folder. Must begin with @site
.
Example:
'@site/src/components/pages/Tools'
required: true
default: undefined
toolPageComponent
Which component to use for showing the tool page (wrapper for the tool itself).
required: false
default: '@theme/ToolPage'
toolOverviewPageComponent
Which component to use for showing the tools overview page.
required: false
default: '@theme/ToolOverviewPage''
Contributing
Contributions are welcome!
Please read the contributing guide.
License
MIT licensed.