Skip to content
Discussion options

You must be logged in to vote

You can only import Node.js APIs like fs in Node.js files. You can't use Node.js APIs in React components, but you can use Node.js APIs in plugins and watch files to reload plugin data and re-render the UI.

Your page looks a bit like our site showcase, for which we have an internal plugin that we are likely to make an official first-party plugin in the future (#9967). This can serve as an inspiration to implement your plugin.

It's outside the scope of Docusaurus to expose an API to let you edit the local toml file, but you can implement this yourself as a separate Node.js server API outside of Docusaurus. If you write to the file and implement a Docusaurus plugin to read it, your page wil…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by AkagiYui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants