redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

command preview-docs / build-docs, use installed redoc.standalone.js rather than fetching from CDN ?

Open mutongwu opened this issue 1 year ago • 6 comments

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.

mutongwu avatar Mar 28 '23 02:03 mutongwu

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.

Orest-Yastremskyy avatar Mar 28 '23 08:03 Orest-Yastremskyy

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.

MelleD avatar May 26 '23 08:05 MelleD

This is preventing us from upgrading as we really want/need/love the 0-dependencies from the old cli.

wvanderdeijl avatar Sep 20 '23 13:09 wvanderdeijl

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.

lornajane avatar Sep 26 '23 11:09 lornajane

+1

AuroraJMP avatar Jan 23 '24 20:01 AuroraJMP