Skip to content

Commit f41eef8

Browse files
committed
Use Google Fonts for Fira Sans
Previously, code.cdn.mozilla.net was used, which for some reason does not set expiration time which prevents caching the fonts. Also, Google Fonts now supports WOFF2 (smaller file sizes) and Fira still has it's awesome ligatures. Oh, and we load the fonts with async JS now. Async font loading is cool.
1 parent 38fb340 commit f41eef8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

_includes/head.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
<meta name="description" content="{{ site.description }}"/>
99

1010
<link rel="stylesheet" href="{{ "/styles.css" | prepend: site.baseurl }}"/>
11-
<link rel="stylesheet" href="//code.cdn.mozilla.net/fonts/fira.css" />
11+
12+
<script type="text/javascript">
13+
WebFontConfig = {
14+
google: { families: [ 'Fira+Sans:400,500,400italic:latin' ] }
15+
};
16+
</script>
17+
<script src="//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" async></script>
18+
1219
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url | replace:'//','/' }}"/>
1320
</head>

0 commit comments

Comments
 (0)