From 3c538e916138ddc7af464842049a056fb8de8fb6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 May 2025 23:08:10 +0000 Subject: [PATCH 1/3] Initial plan for issue From f0415c19537936de072841609a464275cc7d50fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 May 2025 23:12:09 +0000 Subject: [PATCH 2/3] Implement basic SEO improvements Co-authored-by: symysak <103905928+symysak@users.noreply.github.com> --- frontend/app/layout.tsx | 53 +++++++++++++++++++++++++++++---- frontend/app/sitemap.ts | 18 +++++++++++ frontend/components/json-ld.tsx | 24 +++++++++++++++ frontend/config/site.ts | 2 +- frontend/public/robots.txt | 6 ++++ 5 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 frontend/app/sitemap.ts create mode 100644 frontend/components/json-ld.tsx create mode 100644 frontend/public/robots.txt diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index dd3c1b7..93e5162 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -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 = { @@ -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" }, @@ -31,8 +73,10 @@ export default function RootLayout({ children: React.ReactNode; }) { return ( - -
+ href="https://www.prolab.club" + title="久留米高専プログラミングラボ部"> (c) 2024 久留米高専プログラミングラボ部 diff --git a/frontend/app/sitemap.ts b/frontend/app/sitemap.ts new file mode 100644 index 0000000..0b47dab --- /dev/null +++ b/frontend/app/sitemap.ts @@ -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, + }, + ] +} \ No newline at end of file diff --git a/frontend/components/json-ld.tsx b/frontend/components/json-ld.tsx new file mode 100644 index 0000000..6789b42 --- /dev/null +++ b/frontend/components/json-ld.tsx @@ -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 ( + + ); +} \ No newline at end of file diff --git a/frontend/config/site.ts b/frontend/config/site.ts index 34d78ee..47b88fb 100644 --- a/frontend/config/site.ts +++ b/frontend/config/site.ts @@ -2,7 +2,7 @@ export type SiteConfig = typeof siteConfig; export const siteConfig = { name: "ProLab", - description: "description", + description: "久留米高専プログラミングラボ部(ProLab)の公式ウェブサイト。プログラミングを通して技術と創造性を探求する学生団体です。", navItems: [ { label: "Home", diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt new file mode 100644 index 0000000..c718365 --- /dev/null +++ b/frontend/public/robots.txt @@ -0,0 +1,6 @@ +# Allow all web crawlers +User-agent: * +Allow: / + +# Sitemap location +Sitemap: https://www.prolab.club/sitemap.xml \ No newline at end of file From a4097b0e6a5434df82eea8ab76bde2f07249dede Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 May 2025 23:15:11 +0000 Subject: [PATCH 3/3] Update Next.js configuration for SEO Co-authored-by: symysak <103905928+symysak@users.noreply.github.com> --- frontend/next.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/next.config.js b/frontend/next.config.js index 767719f..8626678 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -1,4 +1,9 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = { + poweredByHeader: false, + images: { + domains: ['www.prolab.club'], + } +} module.exports = nextConfig+ +
+