Skip to content

Commit 7f9e19d

Browse files
committed
Add sitemap and eager load Avatar
1 parent 8776886 commit 7f9e19d

6 files changed

Lines changed: 49 additions & 6 deletions

File tree

astro.config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { defineConfig } from 'astro/config';
22
import tailwind from "@astrojs/tailwind";
33
import mdx from "@astrojs/mdx";
4-
54
import expressiveCode from "astro-expressive-code";
65

6+
import sitemap from "@astrojs/sitemap";
7+
78
// https://astro.build/config
89
export default defineConfig({
910
site: "https://www.yanthomas.dev",
1011
integrations: [tailwind(), expressiveCode({
11-
theme: 'dracula',
12-
}), mdx()],
12+
theme: 'dracula'
13+
}), mdx(), sitemap()],
1314
experimental: {
1415
assets: true
1516
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@astrojs/mdx": "^0.19.7",
14+
"@astrojs/sitemap": "^2.0.1",
1415
"@astrojs/tailwind": "^4.0.0",
1516
"@tailwindcss/typography": "^0.5.9",
1617
"astro": "^2.7.2",

pnpm-lock.yaml

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://yanthomas.dev/sitemap-index.xml

src/components/Avatar.astro

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import avatar from "@assets/avatar.png";
44
---
55

66
<Image
7-
class="rounded-full mx-auto hover:scale-110 transition-transform ease-in"
8-
width="225"
9-
height="225"
7+
class="rounded-full mx-auto hover:scale-110 transition-transform ease-in w-60 h-60"
8+
width="400"
9+
height="400"
1010
src={avatar}
1111
alt=""
12+
loading="eager"
1213
/>

src/layouts/MainLayout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
3636
<!-- Low Priority -->
3737
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
3838
<meta name="description" content={description} />
39+
<link rel="sitemap" href="/sitemap-index.xml" />
3940
<!-- OG -->
4041
<meta property="og:title" content={title} />
4142
<meta property="og:description" content={description} />

0 commit comments

Comments
 (0)