diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 0634c14deaa..14a572e952b 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -121,7 +121,8 @@ const config = { position: 'left', }, { - to: 'libdocs', + to: '/libdocs/Accounts', + activeBasePath: '/libdocs/', label: 'Documentation', position: 'left', }, diff --git a/scripts/docshelper/generatedoc.js b/scripts/docshelper/generatedoc.js index 015c37bd28c..835478f5dc1 100644 --- a/scripts/docshelper/generatedoc.js +++ b/scripts/docshelper/generatedoc.js @@ -50,6 +50,8 @@ function postProcessFunctionsDocs(configOptions) { copyDir(packagesPath, configOptions.out); cleanDir(packagesPath); + removeFile("./docs/docs/libdocs/README.md"); + } ///// utils @@ -63,6 +65,14 @@ async function generateDocs(config) { } } +function removeFile(filePath){ + const stats = fs.statSync(filePath); + if (stats.isFile()) { + // If it's a file, delete it + fs.unlinkSync(filePath); + } +} + function copyDir(src, dest) { // Create the destination folder if it doesn't exist if (!fs.existsSync(dest)) {