Skip to content

Commit b35da25

Browse files
authored
Merge pull request #29 from SIT-DigiCre/feat/metadata
Feat/metadata
2 parents 2afcb25 + d1378a0 commit b35da25

File tree

6 files changed

+109
-38
lines changed

6 files changed

+109
-38
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@iconify-json/material-symbols": "1.2.18",
1313
"@iconify-json/simple-icons": "1.2.31",
1414
"@iconify/react": "5.2.1",
15+
"@next/third-parties": "15.3.2",
1516
"@splidejs/react-splide": "0.7.12",
1617
"@splidejs/splide-extension-video": "0.8.0",
1718
"autoprefixer": "10.4.21",

pnpm-lock.yaml

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

src/app/_components/Gallery.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ import { Video } from "@splidejs/splide-extension-video";
66
import "@splidejs/splide-extension-video/dist/css/splide-extension-video.min.css";
77

88
const slideList = [
9-
"/img/buff_zavas.webp",
10-
"/img/credit_bread.webp",
11-
"/img/kawaii_akizuki.webp",
9+
{
10+
src: "/img/buff_zavas.webp",
11+
alt: "頭部がプロテイン飲料のザバスになった男性キャラクター2人を描いたイラスト。1人は白いワイシャツにネクタイとチョッキを着用し、腕を捲っている。もう1人は上裸でこちらを振り向きながら、筋肉を見せつけるようなガッツポーズをしている",
12+
},
13+
{ src: "/img/credit_bread.webp", alt: "モデリングソフトで作った単位パン" },
14+
{
15+
src: "/img/kawaii_akizuki.webp",
16+
alt: "3人の可愛らしい小さな女の子を描いたイラスト。3人とも白地にピンクやグレーのラインが入った不思議なデザインの服を着ている",
17+
},
1218
];
1319

1420
export default function Gallery() {
@@ -28,10 +34,10 @@ export default function Gallery() {
2834
extensions={{ Video }}
2935
>
3036
{slideList.map((item) => (
31-
<SplideSlide key={item}>
37+
<SplideSlide key={item.src}>
3238
<img
33-
src={item}
34-
alt=""
39+
src={item.src}
40+
alt={item.alt}
3541
className="aspect-video object-cover"
3642
/>
3743
</SplideSlide>
@@ -40,7 +46,7 @@ export default function Gallery() {
4046
<SplideSlide data-splide-youtube="https://www.youtube.com/watch?v=nnJ5ml6D2UE">
4147
<img
4248
src="/img/pv.webp"
43-
alt="PV"
49+
alt="デジクリ紹介PV 2024 【芝浦工業大学公認サークル】"
4450
className="aspect-video object-cover"
4551
/>
4652
</SplideSlide>

src/app/layout.tsx

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
SimpleIconsYoutube,
1212
} from "@/components/Icon";
1313
import type { Metadata } from "next";
14-
import { Inter } from "next/font/google";
15-
import { Noto_Sans_JP } from "next/font/google";
14+
import { GoogleAnalytics } from "@next/third-parties/google";
15+
import { Inter, Noto_Sans_JP } from "next/font/google";
1616
import "./globals.css";
1717

1818
const inter = Inter({
@@ -28,42 +28,82 @@ const notoSansJp = Noto_Sans_JP({
2828

2929
const menuList = [
3030
{
31-
icon: <SimpleIconsX className="h-[1.5rem] w-[1.5rem]" />,
31+
icon: (
32+
<SimpleIconsX
33+
className="h-[1.5rem] w-[1.5rem]"
34+
aria-hidden
35+
/>
36+
),
3237
title: "Twitter / X",
3338
href: "https://twitter.com/sitdigicre",
3439
},
3540
{
36-
icon: <SimpleIconsYoutube className="h-[1.5rem] w-[1.5rem]" />,
41+
icon: (
42+
<SimpleIconsYoutube
43+
className="h-[1.5rem] w-[1.5rem]"
44+
aria-hidden
45+
/>
46+
),
3747
title: "YouTube",
3848
href: "https://www.youtube.com/@sitdigicre",
3949
},
4050
{
41-
icon: <SimpleIconsGithub className="h-[1.5rem] w-[1.5rem]" />,
51+
icon: (
52+
<SimpleIconsGithub
53+
className="h-[1.5rem] w-[1.5rem]"
54+
aria-hidden
55+
/>
56+
),
4257
title: "GitHub",
4358
href: "https://github.com/SIT-DigiCre",
4459
},
4560
{
46-
icon: <MaterialSymbolsMail className="h-[1.5rem] w-[1.5rem]" />,
61+
icon: (
62+
<MaterialSymbolsMail
63+
className="h-[1.5rem] w-[1.5rem]"
64+
aria-hidden
65+
/>
66+
),
4767
title: "お問い合わせ",
4868
href: "mailto:[email protected]",
4969
},
5070
{
51-
icon: <MaterialSymbolsArticle className="h-[1.5rem] w-[1.5rem]" />,
71+
icon: (
72+
<MaterialSymbolsArticle
73+
className="h-[1.5rem] w-[1.5rem]"
74+
aria-hidden
75+
/>
76+
),
5277
title: "デジコアブログ",
5378
href: "https://blog.digicre.net/",
5479
},
5580
{
56-
icon: <MaterialSymbolsLogin className="h-[1.5rem] w-[1.5rem]" />,
81+
icon: (
82+
<MaterialSymbolsLogin
83+
className="h-[1.5rem] w-[1.5rem]"
84+
aria-hidden
85+
/>
86+
),
5787
title: "デジコア",
5888
href: "https://core3.digicre.net/",
5989
},
6090
{
61-
icon: <MaterialSymbolsInfo className="h-[1.5rem] w-[1.5rem]" />,
91+
icon: (
92+
<MaterialSymbolsInfo
93+
className="h-[1.5rem] w-[1.5rem]"
94+
aria-hidden
95+
/>
96+
),
6297
title: "入部希望の方へ",
6398
href: "https://digicre.net/welcome/",
6499
},
65100
{
66-
icon: <MaterialSymbolsSchool className="h-[1.5rem] w-[1.5rem]" />,
101+
icon: (
102+
<MaterialSymbolsSchool
103+
className="h-[1.5rem] w-[1.5rem]"
104+
aria-hidden
105+
/>
106+
),
67107
title: "芝浦工業大学",
68108
href: "https://www.shibaura-it.ac.jp/",
69109
},
@@ -86,7 +126,19 @@ export const metadata: Metadata = {
86126
title: "芝浦工業大学 デジクリ",
87127
siteName: "芝浦工業大学 デジクリ",
88128
description: "芝浦工業大学の公認サークル『デジクリ』の Web サイトです。",
89-
images: "/ogp.png",
129+
images: [
130+
{
131+
url: "/ogp.png",
132+
width: 1200,
133+
height: 630,
134+
alt: "デジクリ Digital Creation Circle",
135+
},
136+
],
137+
},
138+
twitter: {
139+
card: "summary_large_image",
140+
site: "@sitdigicre",
141+
creator: "@sitdigicre",
90142
},
91143
};
92144

@@ -97,6 +149,7 @@ export default function RootLayout({
97149
}>) {
98150
return (
99151
<html lang="ja">
152+
<GoogleAnalytics gaId="G-5GLTJ9X6XX" />
100153
<body className={`${notoSansJp.variable} ${inter.variable}`}>
101154
{children}
102155

src/app/page.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { DigicreLogo, MaterialSymbolsOpenInNew } from "@/components/Icon";
22
import Markdown from "react-markdown";
33
import Gallery from "./_components/Gallery";
4+
import type { Metadata } from "next";
45

56
const contents = [
67
{
@@ -48,6 +49,12 @@ const menu = [
4849
},
4950
];
5051

52+
export const metadata: Metadata = {
53+
alternates: {
54+
canonical: "https://digicre.net/",
55+
},
56+
};
57+
5158
export default function Home() {
5259
return (
5360
<main className="bg-sky">

src/components/Icon.tsx

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import type { SVGProps } from "react";
22

33
export function MaterialSymbolsOpenInNew(props: SVGProps<SVGSVGElement>) {
44
return (
5-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
65
<svg
76
xmlns="http://www.w3.org/2000/svg"
87
width="1em"
98
height="1em"
109
viewBox="0 0 24 24"
10+
role="img"
1111
{...props}
1212
>
13+
<title>新しいタブで開く</title>
1314
<path
1415
fill="currentColor"
1516
d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h7v2H5v14h14v-7h2v7q0 .825-.587 1.413T19 21zm4.7-5.3l-1.4-1.4L17.6 5H14V3h7v7h-2V6.4z"
@@ -162,34 +163,17 @@ export function SimpleIconsGithub(props: SVGProps<SVGSVGElement>) {
162163
);
163164
}
164165

165-
export function Digicre(props: SVGProps<SVGSVGElement>) {
166-
return (
167-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
168-
<svg
169-
xmlns="http://www.w3.org/2000/svg"
170-
viewBox="0 0 176 48"
171-
width="1em"
172-
height="1em"
173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DigicreLogo(props: SVGProps<SVGSVGElement>) {
184167
return (
185-
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation>
186168
<svg
187169
xmlns="http://www.w3.org/2000/svg"
188170
viewBox="0 0 176 48"
189171
width="1em"
190172
height="1em"
173+
role="img"
191174
{...props}
192175
>
176+
<title>デジクリ Digital Creation Circle</title>
193177
<path
194178
d="M2 39h4v-1H0v8h6v-1H2v-6zm4 0h2v6H6zm4 1h2v6h-2zm0-2h2v1h-2zm14 2h2v6h-2zm0-2h2v1h-2zm-10 2v6h6v1h-4v1h6v-8h-8Zm6 5h-4v-4h4v4Zm14-4v-1h-3v-2h-2v2h-1v1h1v5h5v-1h-3v-4h3zm4-1v1h4v1h-6v4h8v-6h-6Zm4 5h-4v-2h4v2Zm6 0v-7h-2v8h4v-1h-2zm18-5v-2h-8v8h8v-3h-2v2h-4v-6h4v1h2zm8 0v6h8v-1h-6v-2h6v-3h-8Zm6 2h-4v-1h4v1Zm26-2v6h8v-6h-8Zm6 5h-4v-4h4v4Zm10-4h2v5h-2zm-4-1h-2v6h2v-5h4v-1h-4zm-16 0h2v6h-2zm0-2h2v1h-2zm-2 3v-1h-3v-2h-2v2h-1v1h1v5h5v-1h-3v-4h3zm-14-1v1h4v1h-6v4h8v-6h-6Zm4 5h-4v-2h4v2Zm-20-5h-2v6h2v-5h2v-1h-2zm82 0v6h8v-2h-2v1h-4v-4h4v1h2v-2h-8zm12 5v-7h-2v8h4v-1h-2zm-22-5h2v6h-2zm0-2h2v1h-2zm-2 2v-2h-8v8h8v-3h-2v2h-4v-6h4v1h2zm28 0v6h8v-1h-6v-2h6v-3h-8Zm6 2h-4v-1h4v1Zm-26-2h-2v6h2v-5h2v-1h-2zM29 14H4l3-6h25l-3 6zm-3 10h-6l-4 8H8l4-8H0l3-6h26l-3 6zm4-18h-4l2-6h4l-2 6zm-6 0h-4l2-6h4l-2 6zm38 8H52l3-6h10l-3 6zm-4 10H48l3-6h10l-3 6zm10 8h-8L72 8h8L68 32zM78 6h-4l2-6h4l-2 6zm-6 0h-4l2-6h4l-2 6zm44 26h-8l9-18h-8l-5 10h-8l8-16h24l-12 24zm48 0h-8l12-24h8l-12 24zm-10-8h-10l8-16h8l-5 10h2l-3 6z"
195179
fill="currentColor"

0 commit comments

Comments
 (0)