-
Notifications
You must be signed in to change notification settings - Fork 3
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
Serve google fonts locally #19
Serve google fonts locally #19
Conversation
Hi @Finn10111 I'll take a look at your suggestion. I'm thinking it would be a good idea to give users two options: one is to load google fonts from the internet and the other is to load from a local file. what do you think about it? |
Yes you are right, some people prefer fonts.googleapis.com because of caching and other reasons. But I have to admin that I don't have a lot of experience with Grav and I am not sure how to do that. If you could give me a hint I would like to have dig deeper to find that kind of solution. |
Thanks for your suggestion, this one works for me now. But I don't know if it's the way to go. |
Updated to include all original Google fonts in Editorial Theme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated google-fonts-local.css to include all original google fonts in the editorial theme and reordered the theme blueprint to show the option to choose google fonts before the header section.
Added Spanish traslations
Reordered option in theme options, not in header.
HI @Finn10111 Is the google-font.css file really necessary? So far you have uploaded two css style sheets for google fonts, the first with -local.css and the second with -remote.css |
@pmoreno-rodriguez I didn't know how to choose between the local or remote Google Fonts so I put them in two css style sheets and put the logic in the template, I hope this was okay. |
@Finn10111 I was referring to a third file called google-fonts.css. In your pull-request you have used two files, one ending in -local.css and the other in -remote.css. However, it is already included in the new version of the Editorial theme. For the next version I would like to count on your help and extend the local Google fonts file, to the rest of the encodings that are included in the original (Cyrillic, Vietnamese, Greek, etc.). Currently only the Latin encoding is included. |
Some people may have privacy concerns if the Google fonts are loaded from Google's servers. I downloaded the used fonts and added them to the theme so they are served locally now. This should be GDPR compliant now.
What do you think? I know it's "common" to use fonts.googleapis.com but I am not a big fan of this instead. I was thinking to do this within a child theme but this seemed to be the better approach.