Skip to content

Commit a58cfaf

Browse files
committed
🥢 Page speed optimisations
- Added height to logo - Make google font loading async
1 parent da5baf3 commit a58cfaf

File tree

6 files changed

+54
-47
lines changed

6 files changed

+54
-47
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: "📦 Deploy to GitHub Pages"
1+
name: '📦 CD'
22

33
on:
44
# Runs on pushes targeting the default branch
55
push:
6-
branches: ["master"]
6+
branches: ['master']
77

88
# Allows you to run this workflow manually from the Actions tab
99
workflow_dispatch:
@@ -17,36 +17,36 @@ permissions:
1717
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1818
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1919
concurrency:
20-
group: "pages"
20+
group: 'pages'
2121
cancel-in-progress: false
2222

2323
jobs:
2424
deploy:
2525
runs-on: ubuntu-latest
2626

2727
steps:
28-
- name: "📦 Checkout"
28+
- name: '📦 Checkout'
2929
uses: actions/checkout@v3
3030

31-
- name: "🍔 Set up Bun"
31+
- name: '🍔 Set up Bun'
3232
uses: oven-sh/setup-bun@v1
3333
with:
3434
bun-version: latest
3535

36-
- name: "✅ Install dependencies"
36+
- name: '✅ Install dependencies'
3737
run: bun install
3838

39-
- name: "🧰 Build"
39+
- name: '🧰 Build'
4040
run: bun run build
4141

42-
- name: "🛠️ Setup Pages"
42+
- name: '🛠️ Setup Pages'
4343
uses: actions/configure-pages@v4
4444

45-
- name: "📤 Upload artifact"
45+
- name: '📤 Upload artifact'
4646
uses: actions/upload-pages-artifact@v2
4747
with:
4848
path: './dist'
49-
50-
- name: "🌎 Deploy to GitHub Pages"
49+
50+
- name: '🌎 Deploy to GitHub Pages'
5151
id: deployment
5252
uses: actions/deploy-pages@v3

.github/workflows/test.js.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

krimlabs.com.sketch

318 Bytes
Binary file not shown.

public/img/logo.svg

Lines changed: 18 additions & 9 deletions
Loading

src/components/Nav.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function Nav() {
99
<img
1010
src={'/img/logo.svg'}
1111
alt="Krim Labs Logo Purple"
12-
width={216}
12+
width={160}
13+
height={46.3}
1314
/>
1415
</div>
1516
</a>

src/layouts/Head.astro

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
<head>
2+
3+
<!-- boring stuff -->
24
<meta charset="UTF-8" />
35

46
<link rel="icon" type="image/webp" href="/favicon.webp" />
57
<meta name="viewport" content="width=device-width" />
68

79
<link rel="preconnect" href="https://fonts.googleapis.com" />
810
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9-
<link
10-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap"
11-
rel="stylesheet"
12-
/>
11+
12+
<!-- https://pagespeedchecklist.com/asynchronous-google-fonts->
13+
<!-- connect to domain of font files -->
14+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
15+
16+
<!-- optionally increase loading priority -->
17+
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap">
18+
19+
<!-- async CSS -->
20+
<link rel="stylesheet" media="print" onload="this.onload=null;this.removeAttribute('media');" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap">
21+
22+
<!-- no-JS fallback -->
23+
<noscript>
24+
<link
25+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap"
26+
rel="stylesheet"
27+
/>
28+
</noscript>
29+
30+
31+
<!-- Page specific SEO -->
1332
<slot />
1433
</head>

0 commit comments

Comments
 (0)