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

Preload fonts #162

Open
mestradanu opened this issue Sep 17, 2020 · 1 comment · Fixed by #185
Open

Preload fonts #162

mestradanu opened this issue Sep 17, 2020 · 1 comment · Fixed by #185
Assignees
Labels
optimization Priority 2 Mid level priority

Comments

@mestradanu
Copy link
Contributor

The theme needs the fonts to be preloaded for best practices and optimization.

Notes:

  • If the font is loaded with a parameter (e.g. ?qop3op) like icon fonts sometimes do, the preload tag must also have that parameter.
  • Reference the main theme in NU for how to implement this.
  • Test with the "Lighthouse" tab in Google Chrome, specifically the "Preload key requests" section in the "Performance" test.
@mestradanu
Copy link
Contributor Author

Hey @agameronu we need to switch out the call get_stylesheet_directory_uri() to get_template_directory_uri() since this theme is used as a parent theme. the stylesheet function will point to the current (child) theme and not the theme it belongs to (parent/template).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization Priority 2 Mid level priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants