Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Fonts cannot be disabled #1501

Closed
unikitty37 opened this issue Jan 18, 2021 · 4 comments · Fixed by #1558
Closed

Google Fonts cannot be disabled #1501

unikitty37 opened this issue Jan 18, 2021 · 4 comments · Fixed by #1558

Comments

@unikitty37
Copy link

According to #1045, I should be able to pass the disableGoogleFont parameter to redoc-cli and have the generated HTML not make calls to Google Fonts. However, it does not appear to work.

npx redoc-cli serve api_spec.yml --options.disableGoogleFont

produces a webpage which makes a request to https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700

https://google-webfonts-helper.herokuapp.com/fonts allows fonts to be downloaded from Google Fonts for self-hosting — could Redoc not simply bundle the font files?

Failing that, is there a way to get the disableGoogleFont parameter to work as expected? I really do not want to have to rewrite the privacy policy as the site is now sending requests to Google where it previously did not…

└─▷ npx redoc-cli --version
0.10.2

(I assume that npx is returning an up-to-date version here :)

@adamaltman
Copy link
Member

I thought the option was for the bundle command: npx redoc-cli bundle ...

@unikitty37
Copy link
Author

Ah — could it be added to serve as well? It seems a bit of a waste of bandwidth to override the fonts and still have it trying to load things from Google even though they're not used…

@RomanHotsiy
Copy link
Member

Yes, we can add the same option to the serve command. PR would be appreciated.

@patrickdemers6
Copy link
Contributor

I'll take this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants