In index.ts, sourceBaseUrl gets a "/" added at the end if not already present, but in findCollectables the url is defined as ${sourceBaseUrl}/${d}, causing a double slash in URLs.
This also serves as a way to document how to use this plugin for fetching data from this API, as it requires responseType: "arraybuffer" in its config to work (or it's interpreted as a JSON array, which cannot be serialized to file using the current method).
In
index.ts
,sourceBaseUrl
gets a"/"
added at the end if not already present, but infindCollectables
the url is defined as${sourceBaseUrl}/${d}
, causing a double slash in URLs.The URLs in the current examples do not trigger an error when multiple forward slashes are present. For example, this is a valid URL: https://raw.githubusercontent.com/PowerShell/PowerShell/master////////////README.md
I added an example that does trigger an error using the GitHub API for the issue labels in this same repository: https://api.github.com/repos/rdilweb/docusaurus-plugin-remote-content/labels.
This also serves as a way to document how to use this plugin for fetching data from this API, as it requires
responseType: "arraybuffer"
in its config to work (or it's interpreted as a JSON array, which cannot be serialized to file using the current method).