Skip to content

Commit

Permalink
docs: fix an issue where it goes into an infinite loop when building (#…
Browse files Browse the repository at this point in the history
…4596)

This change sets `noRuntimeDownloads` to `true` for
`plugin-remote-content'` to avoid the infinite loop issue mentioned in
rdilweb/docusaurus-plugin-remote-content#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
```
  • Loading branch information
thomasheartman authored Nov 6, 2023
1 parent f16ad4e commit edb15f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
],
[
Expand All @@ -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,
},
],
],
Expand Down
7 changes: 4 additions & 3 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit edb15f5

Please sign in to comment.