redocly-cli
redocly-cli copied to clipboard
command preview-docs / build-docs, use installed redoc.standalone.js rather than fetching from CDN ?
Describe the problem to be solved
I use the command redocly preview-docs / build-docs
to preview and build redoc html.
But my doc html will be served in a intranet network, which can NOT access the internet and therefor can't load the script file:
https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js
.
Describe the solution you'd like I install redoc in my project , and I hope redocly can use local redoc.standalone.js rather than fetching from CDN.
Describe alternatives you've considered
Even though I can modify the html build from command build-docs
to use a local js. I still hope preview-docs / build-docs
can use the same redoc.standalone.js.
Additional context No configuration option were found relatived to such approach.
Hi @mutongwu,
Thank you for taking the time to share this idea with us.
Our Product Team will further evaluate how it fits our roadmap, however, we cannot guarantee that it will be approved nor can provide you with any timelines.
Thank you for your understanding.
Hi, I would vote for this feature, for me its more a bug :), because the older cli supported this feature that you have no deps inside the HTML. This can be a problem if you have strict content security policies. There should be a way to host all resources yourself.
This is preventing us from upgrading as we really want/need/love the 0-dependencies from the old cli.
I think there's a workaround that could help with this use case while we consider making the change part of the tool. The instructions for using the HTML tag show how to get the dependencies into your own project: https://redocly.com/docs/redoc/deployment/html/#self-host-dependencies
Disclaimer: I have not tried this, but I wonder if we can adapt this approach to support the use case outlined in this issue.
+1