Skip to main content

Configuration

All options are passed as the second element of the plugin tuple in your docusaurus.config.ts (or .js).

Options

OptionTypeRequiredDefaultDescription
pathstringNo"data/faqs"Path to the directory containing your *.yaml/*.yml FAQ files. Relative paths are resolved from your site directory; absolute paths are used as-is.
routeBasePathstringNo"faqs"URL path where the generated FAQ page is served.

TypeScript example

import faqsPlugin, { type PluginOptions as FAQOptions } from '@homotechsual/docusaurus-plugin-faqs'

export default {
plugins: [
[
faqsPlugin,
{
path: 'content/faqs',
routeBasePath: 'help',
} satisfies FAQOptions,
],
],
}

This serves the FAQ page at /help and reads YAML files from content/faqs/.

JavaScript example

export default {
plugins: [
[
'@homotechsual/docusaurus-plugin-faqs',
{
path: 'content/faqs',
routeBasePath: 'help',
},
],
],
}