Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 48 additions & 5 deletions frontend/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Providers } from "./providers";
import { Navbar } from "@/components/navbar";
import { Link } from "@nextui-org/react";
import clsx from "clsx";
import JsonLd from "@/components/json-ld";


export const metadata: Metadata = {
Expand All @@ -14,6 +15,47 @@ export const metadata: Metadata = {
template: `%s - ${siteConfig.name}`,
},
description: siteConfig.description,
keywords: ["プログラミング", "久留米高専", "プログラミングラボ", "ProLab", "部活動", "学生団体", "コーディング", "技術"],
authors: [{ name: "久留米高専プログラミングラボ部", url: "https://www.prolab.club" }],
creator: "久留米高専プログラミングラボ部",
publisher: "久留米高専プログラミングラボ部",
metadataBase: new URL("https://www.prolab.club"),
alternates: {
canonical: "/",
},
openGraph: {
type: "website",
locale: "ja_JP",
url: "https://www.prolab.club",
title: siteConfig.name,
description: siteConfig.description,
siteName: siteConfig.name,
images: [
{
url: "/logo.png",
width: 512,
height: 512,
alt: "ProLab Logo",
}
],
},
twitter: {
card: "summary_large_image",
title: siteConfig.name,
description: siteConfig.description,
creator: "@prolabknct",
images: ["/logo.png"],
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
"max-image-preview": "large",
"max-snippet": -1,
},
},
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "white" },
{ media: "(prefers-color-scheme: dark)", color: "black" },
Expand All @@ -31,8 +73,10 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<html lang="ja" suppressHydrationWarning>
<head>
<JsonLd />
</head>
<body
className={clsx(
"min-h-screen bg-background font-sans antialiased",
Expand All @@ -50,9 +94,8 @@ export default function RootLayout({
<Link
isExternal
className="flex items-center gap-1 text-current"
href="https://nextui-docs-v2.vercel.app?utm_source=next-app-template"
title="nextui.org homepage"
>
href="https://www.prolab.club"
title="久留米高専プログラミングラボ部">
<span className="text-default-600">(c) 2024 久留米高専プログラミングラボ部</span>
</Link>
</footer>
Expand Down
18 changes: 18 additions & 0 deletions frontend/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { MetadataRoute } from 'next'

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: 'https://www.prolab.club',
lastModified: new Date(),
changeFrequency: 'weekly',
priority: 1,
},
{
url: 'https://www.prolab.club/about',
lastModified: new Date(),
changeFrequency: 'monthly',
priority: 0.8,
},
]
}
24 changes: 24 additions & 0 deletions frontend/components/json-ld.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';

export default function JsonLd() {
const organizationData = {
'@context': 'https://schema.org',
'@type': 'Organization',
name: '久留米高専プログラミングラボ部',
alternateName: 'ProLab',
url: 'https://www.prolab.club',
logo: 'https://www.prolab.club/logo.png',
sameAs: [
'https://twitter.com/prolabknct',
'https://github.com/ProgrammingLab/www.prolab.club'
],
description: '久留米高専プログラミングラボ部(ProLab)の公式ウェブサイト。プログラミングを通して技術と創造性を探求する学生団体です。'
};

return (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationData) }}
/>
);
}
2 changes: 1 addition & 1 deletion frontend/config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export type SiteConfig = typeof siteConfig;

export const siteConfig = {
name: "ProLab",
description: "description",
description: "久留米高専プログラミングラボ部(ProLab)の公式ウェブサイト。プログラミングを通して技術と創造性を探求する学生団体です。",
navItems: [
{
label: "Home",
Expand Down
7 changes: 6 additions & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
poweredByHeader: false,
images: {
domains: ['www.prolab.club'],
}
}

module.exports = nextConfig
6 changes: 6 additions & 0 deletions frontend/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Allow all web crawlers
User-agent: *
Allow: /

# Sitemap location
Sitemap: https://www.prolab.club/sitemap.xml