diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c80bcbb..d9ca78b 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -13,7 +13,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set .ENV file - run: echo "API_HOST=${{ secrets.API_HOST }}" > .env + run: | + echo "API_HOST=${{ secrets.API_HOST }}" >> .env + echo "NEXT_PUBLIC_GA_ID=${{ secrets.PUBLIC_GA_ID }}" >> .env - name: Build docker image run: docker build -t sonny2024/polabo-fe . - name: Login to DockerHub diff --git a/src/app/(board)/board/[boardId]/page.tsx b/src/app/(board)/board/[boardId]/page.tsx index 5f73300..fd72268 100644 --- a/src/app/(board)/board/[boardId]/page.tsx +++ b/src/app/(board)/board/[boardId]/page.tsx @@ -1,11 +1,30 @@ import PolaroidCard from '@/components/Polaroid/PolaroidCard' import { getBoard } from '@/lib' +import { Metadata } from 'next' import CreatePolaroid from './components/CreatePolaroidModal' import { ModalProvider } from './components/CreatePolaroidModal/ModalContext' import Empty from './components/Empty' import BoardHeader from './components/Header' import OpenModalBtn from './components/OpenModalBtn' +export async function generateMetadata({ + params, +}: BoardPageProps): Promise { + const { boardId } = params + const board = await getBoard(boardId) + + return { + openGraph: { + title: board.title, + description: '내 보드를 우리의 소중한 추억들로 꾸며줘!', + }, + twitter: { + title: board.title, + description: '내 보드를 우리의 소중한 추억들로 꾸며줘!', + }, + } +} + interface BoardPageProps { params: { boardId: string @@ -16,8 +35,6 @@ const BoardPage = async ({ params }: BoardPageProps) => { const { boardId } = params const board = await getBoard(boardId) - console.log('>> BOARD: ', board) - return (
diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e55d84a..2261e8e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -19,8 +19,9 @@ const Hesom = localFont({ }) export const metadata: Metadata = { - title: 'POLABO', - description: '우리만의 추억보드', + title: 'POLABO | 함께 꾸미는 폴라로이드 보드, 폴라보', + description: + '우리의 일상도 특별하게! 소중한 추억들을 공유하며 폴라로이드로 보드를 꾸며봐요.', metadataBase: new URL('https://polabo.site'), openGraph: { images: [ diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts new file mode 100644 index 0000000..0e7bdf9 --- /dev/null +++ b/src/app/sitemap.ts @@ -0,0 +1,16 @@ +import { MetadataRoute } from 'next' + +export default async function sitemap(): Promise { + return [ + { + url: `https://polabo.site`, + lastModified: new Date(), + priority: 1, + }, + { + url: `https://polabo.site/board/create`, + lastModified: new Date(), + priority: 0.8, + }, + ] +}