From edb15f5d00306676417136536fec678a16bbc254 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Mon, 6 Nov 2023 13:13:58 +0100 Subject: [PATCH] docs: fix an issue where it goes into an infinite loop when building (#4596) This change sets `noRuntimeDownloads` to `true` for `plugin-remote-content'` to avoid the infinite loop issue mentioned in https://github.com/rdilweb/docusaurus-plugin-remote-content/issues/51, as described in https://github.com/rdilweb/docusaurus-plugin-remote-content#noruntimedownloads. It also updates some of the yarn scripts to generate the required files before `yarn start`, `yarn build`, and `yarn deploy`. To manually generate the files, run: ```bash yarn docusaurus download-remote-content-external yarn docusaurus download-remote-content-sdks ``` --- website/docusaurus.config.js | 2 ++ website/package.json | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 745750e6b7..729f7a976f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -714,6 +714,7 @@ module.exports = { outDir: 'docs/generated', // the base directory to output to. documents: sdks.urls, // the file names to download modifyContent: sdks.modifyContent, + noRuntimeDownloads: true, }, ], [ @@ -725,6 +726,7 @@ module.exports = { outDir: 'docs/generated/', // the base directory to output to. documents: edgeAndProxy.urls, // the file names to download modifyContent: edgeAndProxy.modifyContent, + noRuntimeDownloads: true, }, ], ], diff --git a/website/package.json b/website/package.json index 65a1a1178e..c243490028 100644 --- a/website/package.json +++ b/website/package.json @@ -7,11 +7,12 @@ }, "scripts": { "docusaurus": "docusaurus", - "start": "docusaurus start", - "build": "yarn generate && docusaurus build", + "start": "yarn fetch-remote-content && docusaurus start", + "build": "yarn generate && yarn fetch-remote-content && docusaurus build", "swizzle": "docusaurus swizzle", + "fetch-remote-content": "docusaurus download-remote-content-external && docusaurus download-remote-content-sdks", "generate": "docusaurus gen-api-docs all && node clean-generated-docs.js", - "deploy": "yarn generate && docusaurus deploy", + "deploy": "yarn generate && yarn fetch-remote-content && docusaurus deploy", "clear": "docusaurus clear", "serve": "docusaurus serve", "write-translations": "docusaurus write-translations",