Repository navigation
Automate the plugin content in Docusaurus.config.js after adding a new MD folder #7948
SudhaM-Hexaware
started this conversation in
v1-v2 migration
Replies: 1 comment 2 replies
|
The config file is Node.js so technically you can use whatever you want here to create your config dynamically based on your own file-system conventions. What prevents you from doing this now yourself: use node fs, read the filesystem and compute a dynamic array of docs plugins? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am trying to automate the process of adding the MD files in docusaurus. Thereby need to define values in plugins - Docusaurus.config.js each time. Are there any ways to automate the plugin content after adding a new MD folder?
plugin=[[ "@docusaurus/plugin-content-docs", { id: "reacthooks", path: "reacthooks", routeBasePath: "reacthooks", sidebarPath: require.resolve("./sidebars.js"), }, ]I want the above lines to be automatically added to Docusaurus. config file whenever a new MD folder gets added.
All reactions