Skip to content

Commit 63fb902

Browse files
committed
Reorganized <link rel="preconnect> tags for improved font loading consistency and removed duplicates in default and homepage layouts.
1 parent e28bf90 commit 63fb902

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

_layouts/default.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1919

20+
<link rel="preconnect" href="https://fonts.googleapis.com">
21+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
22+
2023
{% capture homepage_path %}/{{ page.lang }}/{% endcapture %}
2124
{% if page.url == homepage_path %}
2225
{% assign meta_description = "A Programmer's Best Friend" %}
@@ -61,10 +64,8 @@
6164
<meta itemprop="description" content="{{ meta_description }}">
6265
<meta itemprop="image" content="{{ site.url }}/images/og-image.png">
6366

64-
<link rel="stylesheet" type="text/css" href="/stylesheets/main.css">
65-
<link rel="preconnect" href="https://fonts.googleapis.com">
66-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
6767
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Noto+Sans+KR:wght@100..900&family=Noto+Sans+SC:wght@100..900&family=Noto+Sans+TC:wght@100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Material+Icons&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..24,200..700,0,0&display=swap" rel="stylesheet">
68+
<link rel="stylesheet" type="text/css" href="/stylesheets/main.css">
6869
<link rel="canonical" href="{{ site.url }}{{ page.url | replace: 'index.html', '' }}">
6970

7071
<link rel="icon" href="/favicon.ico" sizes="32x32">

_layouts/homepage.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1414

15+
<link rel="preconnect" href="https://fonts.googleapis.com">
16+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
17+
1518
{% assign meta_description = "A Programmer's Best Friend" %}
1619
{% assign meta_title = page.title | default: "Ruby Programming Language" %}
1720

@@ -38,10 +41,8 @@
3841
<meta itemprop="description" content="{{ meta_description }}">
3942
<meta itemprop="image" content="{{ site.url }}/images/og-image.png">
4043

41-
<link rel="stylesheet" type="text/css" href="/stylesheets/main.css">
42-
<link rel="preconnect" href="https://fonts.googleapis.com">
43-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
4444
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Noto+Sans+KR:wght@100..900&family=Noto+Sans+SC:wght@100..900&family=Noto+Sans+TC:wght@100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Material+Icons&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..24,200..700,0,0&display=swap" rel="stylesheet">
45+
<link rel="stylesheet" type="text/css" href="/stylesheets/main.css">
4546
<link rel="canonical" href="{{ site.url }}{{ page.url | replace: 'index.html', '' }}">
4647

4748
<link rel="icon" href="/favicon.ico" sizes="32x32">

0 commit comments

Comments
 (0)