Skip to content

Commit fbb5380

Browse files
committed
feat(2025): add seo and ogp
1 parent 1f6d64d commit fbb5380

File tree

3 files changed

+119
-19
lines changed

3 files changed

+119
-19
lines changed

2025/public/logo-white.svg

Lines changed: 77 additions & 0 deletions
Loading

2025/public/og.png

70.7 KB
Loading

2025/src/layouts/Layout.astro

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
11
---
22
import { GoogleFontsOptimizer } from "astro-google-fonts-optimizer";
3+
import { SEO } from "astro-seo";
34
import Header from "../components/Header.astro";
45
import Footer from '../components/Footer.astro';
6+
import { BASE_URL } from "@/consts";
7+
8+
import * as ufo from 'ufo'
59
610
const { lang = 'ja' } = Astro.props;
11+
12+
const title = "VimConf 2025";
13+
const description = "VimConf 2025";
14+
const ogImageUrl = ufo.joinURL(BASE_URL, 'og.png');
715
---
816
<!DOCTYPE html>
917
<html lang={lang}>
1018
<head>
1119
<meta charset="utf-8">
12-
<meta name="viewport" content="width=device-width, initial-scale=1">
13-
<meta name="description" content="VimConf 2025">
14-
<meta name="author" content="VimConf 2025">
15-
16-
<GoogleFontsOptimizer url="https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&display=swap">
17-
</GoogleFontsOptimizer>
18-
19-
<title>VimConf 2025</title>
20+
<GoogleFontsOptimizer url="https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&display=swap" />
21+
<SEO
22+
{title}
23+
{description}
24+
openGraph={{
25+
basic:{
26+
title,
27+
type: 'website',
28+
image: ogImageUrl,
29+
url: BASE_URL,
30+
},
31+
}}
32+
twitter={{
33+
title,
34+
description,
35+
creator: '@vim_jp',
36+
card: 'summary_large_image',
37+
image: ogImageUrl,
38+
}}
39+
extend={{
40+
link: [{ rel: "icon", href: ufo.joinURL(BASE_URL, "favicon.svg") }],
41+
}}
42+
/>
2043
</head>
2144
<body>
2245
<Header />
@@ -27,19 +50,19 @@ const { lang = 'ja' } = Astro.props;
2750

2851
<style>
2952
* {
30-
margin: 0;
31-
padding: 0;
32-
box-sizing: border-box;
53+
margin: 0;
54+
padding: 0;
55+
box-sizing: border-box;
3356
}
3457

3558
body {
36-
font-family: "Helvetica Neue",
37-
Arial,
38-
"Hiragino Kaku Gothic ProN",
39-
"Hiragino Sans",
40-
Meiryo,
41-
sans-serif;
42-
line-height: 2.4;
43-
color: #333;
59+
font-family: "Helvetica Neue",
60+
Arial,
61+
"Hiragino Kaku Gothic ProN",
62+
"Hiragino Sans",
63+
Meiryo,
64+
sans-serif;
65+
line-height: 2.4;
66+
color: #333;
4467
}
4568
</style>

0 commit comments

Comments
 (0)