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? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions