Skip to content
Merged
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
16 changes: 6 additions & 10 deletions apps/web/src/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@ import type { Metadata } from "next";
import { getHomeNewsList } from "@/apis/news/server/getNewsList";
import { getCategorizedUniversities, getRecommendedUniversity } from "@/apis/universities/server";
import { type ListUniversity, RegionEnumExtend } from "@/types/university";
import { createUrl } from "@/utils/seo";
import FindLastYearScoreBar from "./_ui/FindLastYearScoreBar";
import HomeEntrySection from "./_ui/HomeEntrySection";
import NewsSection from "./_ui/NewsSection";
import PopularUniversitySection from "./_ui/PopularUniversitySection";
import UniversityList from "./_ui/UniversityList";

const baseUrl = process.env.NEXT_PUBLIC_WEB_URL || "https://solid-connection.com";
const ogImageUrl = `${baseUrl}/opengraph-image.png`;
const pageUrl = createUrl("/");
const ogImageUrl = createUrl("/opengraph-image.png");
const homeMetaTitle = "교환학생 사이트 | 솔리드 커넥션 – 교환학생 커뮤니티, 플랫폼";

export const metadata: Metadata = {
title: homeMetaTitle,
description:
"교환학생 사이트 솔리드커넥션. 교환학생 커뮤니티에서 학교 검색, 성적 입력, 지원 현황 확인까지 한 번에. 교환학생 준비를 위한 모든 정보를 제공합니다.",
alternates: {
canonical: `${baseUrl}/`,
canonical: pageUrl,
},
openGraph: {
title: homeMetaTitle,
description:
"교환학생 사이트 솔리드커넥션. 교환학생 커뮤니티에서 학교 검색, 성적 입력, 지원 현황 확인까지 한 번에. 교환학생 준비를 위한 모든 정보를 제공합니다.",
url: `${baseUrl}/`,
url: pageUrl,
siteName: "솔리드커넥션",
locale: "ko_KR",
type: "website",
Expand All @@ -49,13 +50,8 @@ const structuredData = {
"@context": "https://schema.org",
"@type": "WebSite",
name: "솔리드커넥션",
url: `${baseUrl}/`,
url: pageUrl,
description: "교환학생 학교 검색, 성적 입력, 지원 현황 확인까지 가능한 교환학생 플랫폼.",
potentialAction: {
"@type": "SearchAction",
target: `${baseUrl}/university?searchText={search_term_string}`,
"query-input": "required name=search_term_string",
},
};

const resolveRecommendedUniversitiesHomeUniversityName = (
Expand Down
10 changes: 8 additions & 2 deletions apps/web/src/app/api/revalidate/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ interface RevalidateRequestBody {
boardCode?: string;
}

type RevalidateTagWithExpire = (tag: string, profile: { expire: number }) => void;

const revalidateTagNow = (tag: string) => {
(revalidateTag as RevalidateTagWithExpire)(tag, { expire: 0 });
};

/**
* @description ISR 페이지를 수동으로 revalidate하는 API
* POST /api/revalidate
Expand Down Expand Up @@ -57,7 +63,7 @@ async function POST(request: NextRequest) {
// boardCode가 있으면 해당 커뮤니티 페이지 revalidate
if (boardCode) {
revalidatePath(`/community/${boardCode}`);
revalidateTag(`posts-${boardCode}`, { expire: 0 });
revalidateTagNow(`posts-${boardCode}`);

return NextResponse.json({
revalidated: true,
Expand All @@ -78,7 +84,7 @@ async function POST(request: NextRequest) {

// 특정 태그 revalidate
if (tag) {
revalidateTag(tag, { expire: 0 });
revalidateTagNow(tag);
return NextResponse.json({
revalidated: true,
message: `Tag ${tag} revalidated`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from "next";

import TopDetailNavigation from "@/components/layout/TopDetailNavigation";
import { NO_INDEX_ROBOTS } from "@/utils/seo";

import PostModifyContent from "./PostModifyContent";

Expand All @@ -13,6 +14,7 @@ interface PostModifyPageProps {

export const metadata: Metadata = {
title: "글 수정",
robots: NO_INDEX_ROBOTS,
};

const PostModifyPage = async ({ params }: PostModifyPageProps) => {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/community/[boardCode]/[postId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from "next";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import PostPageContent from "./PostPageContent";

interface PostPageProps {
Expand All @@ -10,7 +11,8 @@ interface PostPageProps {
}

export const metadata: Metadata = {
title: "게시글",
title: "게시글 | 솔리드커넥션",
robots: NO_INDEX_ROBOTS,
};

const PostPage = async ({ params }: PostPageProps) => {
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/community/[boardCode]/create/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { NO_INDEX_ROBOTS } from "@/utils/seo";
import PostForm from "./PostForm";

export const metadata = {
title: "글쓰기",
robots: NO_INDEX_ROBOTS,
};

const PostCreatePage = async ({ params }: { params: Promise<{ boardCode: string }> }) => {
Expand Down
24 changes: 20 additions & 4 deletions apps/web/src/app/community/[boardCode]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
import type { Metadata } from "next";
import TopDetailNavigation from "@/components/layout/TopDetailNavigation";
import { COMMUNITY_BOARDS } from "@/constants/community";
import { NO_INDEX_ROBOTS } from "@/utils/seo";
import CommunityPageContent from "./CommunityPageContent";

export const metadata: Metadata = {
title: "커뮤니티",
};

interface CommunityPageProps {
params: Promise<{
boardCode: string;
}>;
}

export async function generateMetadata({ params }: CommunityPageProps): Promise<Metadata> {
const { boardCode } = await params;
const board = COMMUNITY_BOARDS.find((item) => item.code === boardCode);

if (!board) {
return {
title: "커뮤니티",
robots: NO_INDEX_ROBOTS,
};
}

return {
title: `${board.nameKo} 교환학생 커뮤니티 | 솔리드커넥션`,
description: `${board.nameKo} 교환학생 준비, 파견 생활, 학교 정보와 질문을 나누는 솔리드커넥션 커뮤니티입니다.`,
robots: NO_INDEX_ROBOTS,
};
}

const CommunityPage = async ({ params }: CommunityPageProps) => {
const { boardCode } = await params;

Expand Down
3 changes: 3 additions & 0 deletions apps/web/src/app/community/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { NO_INDEX_ROBOTS } from "@/utils/seo";

export const metadata: Metadata = {
title: "커뮤니티",
robots: NO_INDEX_ROBOTS,
};

const CommunityIndex = () => {
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import AppleScriptLoader from "@/lib/ScriptLoader/AppleScriptLoader";
import "@/styles/globals.css";
import { GoogleAnalytics } from "@next/third-parties/google";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { getSiteUrl } from "@/utils/seo";

const siteUrl = process.env.NEXT_PUBLIC_WEB_URL || "https://solid-connection.com";
const siteUrl = getSiteUrl();

export const metadata: Metadata = {
metadataBase: new URL(siteUrl),
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/login/apple/callback/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Metadata } from "next";
import { Suspense } from "react";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import AppleLoginCallbackPage from "./AppleLoginCallbackPage";

export const metadata: Metadata = {
title: "애플 로그인 중...",
robots: NO_INDEX_ROBOTS,
};

const Page = () => (
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/login/kakao/callback/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Metadata } from "next";
import { Suspense } from "react";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import KakaoLoginCallbackPage from "./KakaoLoginCallbackPage";

export const metadata: Metadata = {
title: "카카오 로그인 중...",
robots: NO_INDEX_ROBOTS,
};

const Page = () => (
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { Metadata } from "next";
import KakaoScriptLoader from "@/lib/ScriptLoader/KakaoScriptLoader";
import { NO_INDEX_ROBOTS } from "@/utils/seo";
import LoginContent from "./LoginContent";

export const metadata: Metadata = {
title: "로그인",
robots: NO_INDEX_ROBOTS,
};

const LoginPage = () => {
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/app/mentor/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import MentorDetialContent from "./_ui/MentorDetialContent";

export const metadata: Metadata = {
title: "멘토 상세 정보 | Solid Connect",
title: "멘토 상세 정보 | 솔리드커넥션",
description: "멘토의 상세 정보와 경험, 아티클을 확인하고 멘토링을 신청해보세요.",
keywords: ["멘토", "멘토링", "유학", "상세정보", "교환학생"],
robots: NO_INDEX_ROBOTS,
};

interface MentorDetailPageProps {
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/app/mentor/chat/[chatId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import ChatContent from "./_ui/ChatContent";
import ChatNavBar from "./_ui/ChatNavBar";

export const metadata: Metadata = {
title: "멘토와 채팅 | Solid Connect",
title: "멘토와 채팅 | 솔리드커넥션",
description: "멘토와 실시간으로 대화하며 궁금한 점을 해결해보세요.",
keywords: ["멘토", "채팅", "실시간", "대화", "멘토링", "질문"],
robots: NO_INDEX_ROBOTS,
};

interface ChatDetailPageProps {
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/app/mentor/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import ChatPageClient from "./_ui/ChatPageClient";

export const metadata: Metadata = {
title: "멘토 채팅 목록 | Solid Connect",
title: "멘토 채팅 목록 | 솔리드커넥션",
description: "멘토와의 채팅 목록을 확인하고 대화를 이어가세요.",
keywords: ["멘토", "채팅", "대화", "멘토링", "소통"],
robots: NO_INDEX_ROBOTS,
};

const ChatPage = () => {
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/app/mentor/modify/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import ModifyContent from "./_ui/ModifyContent";

export const metadata: Metadata = {
title: "멘토 정보 수정 | Solid Connect",
title: "멘토 정보 수정 | 솔리드커넥션",
description: "멘토 프로필과 정보를 수정하여 더 나은 멘토링을 제공하세요.",
keywords: ["멘토", "정보수정", "프로필", "멘토링", "설정"],
robots: NO_INDEX_ROBOTS,
};

const ModifyPage = () => {
Expand Down
10 changes: 7 additions & 3 deletions apps/web/src/app/mentor/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import type { Metadata } from "next";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import MentorClient from "./_ui/MentorClient";

const title = "교환학생 멘토 찾기 | 솔리드커넥션";
const description = "교환학생을 다녀온 멘토의 국가, 파견 대학, 합격 팁을 확인하고 나에게 맞는 멘토링을 신청해보세요.";

export const metadata: Metadata = {
title: "멘토 찾기 | Solid Connect",
description: "다양한 분야의 전문 멘토들을 만나보세요. 유학, 취업, 진로 상담을 받을 수 있습니다.",
keywords: ["멘토", "멘토링", "유학", "취업", "진로상담", "전문가"],
title,
description,
robots: NO_INDEX_ROBOTS,
};

const MentorPage = () => {
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/app/mentor/waiting/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";

import { NO_INDEX_ROBOTS } from "@/utils/seo";
import WaitingContent from "./_ui/WaitingContent";

export const metadata: Metadata = {
title: "멘토 승인 대기 | Solid Connect",
title: "멘토 승인 대기 | 솔리드커넥션",
description: "멘토 신청이 접수되었습니다. 승인 결과를 기다려주세요.",
keywords: ["멘토", "승인", "대기", "신청", "멘토링"],
robots: NO_INDEX_ROBOTS,
};

const WaitingPage = () => {
Expand Down
13 changes: 13 additions & 0 deletions apps/web/src/app/my/apply-mentor/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Metadata } from "next";
import type { ReactNode } from "react";

import { NO_INDEX_ROBOTS } from "@/utils/seo";

export const metadata: Metadata = {
title: "멘토 회원 전환",
robots: NO_INDEX_ROBOTS,
};

const ApplyMentorLayout = ({ children }: { children: ReactNode }) => children;

export default ApplyMentorLayout;
2 changes: 2 additions & 0 deletions apps/web/src/app/my/favorite/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Metadata } from "next";

import TopDetailNavigation from "@/components/layout/TopDetailNavigation";
import { NO_INDEX_ROBOTS } from "@/utils/seo";

import FavoriteContent from "./_ui/FavoriteContent";

export const metadata: Metadata = {
title: "관심학교",
robots: NO_INDEX_ROBOTS,
};

const FavoritePage = () => {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/my/match/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Metadata } from "next";

import TopDetailNavigation from "@/components/layout/TopDetailNavigation";
import { NO_INDEX_ROBOTS } from "@/utils/seo";

import MatchContent from "./_ui/MatchContent";

export const metadata: Metadata = {
title: "프로필 수정",
title: "매칭 멘토",
robots: NO_INDEX_ROBOTS,
};

const MatchPage = () => {
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/my/modify/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Metadata } from "next";

import TopDetailNavigation from "@/components/layout/TopDetailNavigation";
import { NO_INDEX_ROBOTS } from "@/utils/seo";

import ModifyContent from "./_ui/ModifyContent";

export const metadata: Metadata = {
title: "프로필 수정",
robots: NO_INDEX_ROBOTS,
};

const ModifyPage = () => {
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/my/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Metadata } from "next";

import TopDetailNavigation from "@/components/layout/TopDetailNavigation";
import { NO_INDEX_ROBOTS } from "@/utils/seo";

import MyProfileContent from "./_ui/MyProfileContent";

export const metadata: Metadata = {
title: "마이페이지",
robots: NO_INDEX_ROBOTS,
};

const MyPage = () => {
Expand Down
Loading
Loading