Closed kwiliarty closed 6 years ago
I would prefer not to call for fonts twice or to load fonts that I won't be using.
Not sure I follow the "twice" logic?
If I want to use a different Google font I can add a <link>
element in the hook_head_end
and that works fine, but the link from the head.html
partial will still be there:
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface|PT+Sans:400,400i,700">
...
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Pompiere">
So I'll still be calling for Abril even though I plan to use Pompiere in its place. It's pretty minor.
If I want to use a different Google font I can add a el
Ah, I see.
What I suggest is this:
Pull this line:
https://github.com/spf13/hyde/blob/master/layouts/partials/head.html#L22
Into its own partial: head_fonts.html
.
Then you can get what you want.
Yes, that looks ideal. I've pushed a new candidate.
Thanks again!
Elegant. I've changed my branch to follow your suggestion.
I do still wonder about the Google fonts, but it's a minor thing. I would prefer not to call for fonts twice or to load fonts that I won't be using. Would it make sense to have the font link in its own partial so that it could be overridden cleanly? I could add that to this PR, make a separate issue for it, or just drop it if you don't think it's necessary or useful.