Skip to content

Commit 8ba8f7f

Browse files
studioromeodaviddarnes
authored andcommitted
Update font variable names as suggested
1 parent 18dbce5 commit 8ba8f7f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

_config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ sharing_links: # Appear at the bottom of single blog posts, add as desired. The
154154
#
155155
# TIP: Try to keep the number of urls as low to reduce the performance cost
156156
# If multiple fonts can be requested in a single url opt for this
157-
custom_fonts:
158-
preconnect:
157+
fonts:
158+
preconnect_urls:
159159
- https://fonts.gstatic.com
160-
urls:
160+
font_urls:
161161
- https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap

_includes/site-custom-fonts.html renamed to _includes/site-fonts.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{% if site.custom_fonts.urls %}
2-
{% for font in site.custom_fonts.urls %}
1+
{% if site.fonts.font_urls %}
2+
{% for font in site.fonts.font_urls %}
33
<link rel="preload" as="style" href="{{ font }}" />
44
<link href="{{ font }}" rel="stylesheet" media="print" onload="this.media='all'" />
55
{% endfor %}
66
<noscript>
7-
{% for font in site.custom_fonts.urls %}
7+
{% for font in site.fonts.font_urls %}
88
<link href="{{ font }}" rel="stylesheet" />
99
{% endfor %}
1010
</noscript>

_layouts/default.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
{% else %}
2222
{% seo %}
2323
{% endif %}
24-
{% if site.custom_fonts.preconnect %}
25-
{% for preconnect in site.custom_fonts.preconnect %}
26-
<link rel="preconnect" href="{{ preconnect }}" crossorigin />
24+
{% if site.fonts.preconnect_urls %}
25+
{% for url in site.fonts.preconnect_urls %}
26+
<link rel="preconnect" href="{{ url }}" crossorigin />
2727
{% endfor %}
2828
{% endif %}
2929

@@ -40,7 +40,7 @@
4040

4141
{% if site.google_analytics %}{% include site-analytics.html %}{% endif %}
4242

43-
{% include site-custom-fonts.html %}
43+
{% include site-fonts.html %}
4444

4545
{% include site-before-start.html %}
4646
</head>

0 commit comments

Comments
 (0)