From 219dc86adb36756fa5dd9705ec159f4bd4636370 Mon Sep 17 00:00:00 2001 From: Seo San Date: Tue, 3 Dec 2024 13:29:36 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=E2=9C=A8=20feat:=20SEO=20=EC=B5=9C?= =?UTF-8?q?=EC=A0=81=ED=99=94=20#254=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20alt?= =?UTF-8?q?=20=EC=86=8D=EC=84=B1=20=EC=B6=94=EA=B0=80.=20react-helmet?= =?UTF-8?q?=EC=9D=84=20=EC=9D=B4=EC=9A=A9=ED=95=B4=20meta=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=EC=99=80=20title=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/package-lock.json | 11 +++++++++++ FE/package.json | 1 + FE/public/robots.txt | 2 ++ FE/src/App.tsx | 9 +++++++++ FE/src/components/Header.tsx | 2 +- FE/src/page/Home.tsx | 5 +++++ FE/src/page/MyPage.tsx | 5 +++++ FE/src/page/Rank.tsx | 7 ++++++- FE/src/page/StocksDetail.tsx | 5 +++++ 9 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 FE/public/robots.txt diff --git a/FE/package-lock.json b/FE/package-lock.json index 76198c20..09bb14fb 100644 --- a/FE/package-lock.json +++ b/FE/package-lock.json @@ -26,6 +26,7 @@ "@types/node": "^22.9.1", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", + "@types/react-helmet": "^6.1.11", "@vitejs/plugin-react": "^4.3.3", "autoprefixer": "^10.4.20", "eslint": "^9.13.0", @@ -1384,6 +1385,16 @@ "@types/react": "*" } }, + "node_modules/@types/react-helmet": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.11.tgz", + "integrity": "sha512-0QcdGLddTERotCXo3VFlUSWO3ztraw8nZ6e3zJSgG7apwV5xt+pJUS8ewPBqT4NYB1optGLprNQzFleIY84u/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.12.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", diff --git a/FE/package.json b/FE/package.json index cd6f9135..e0a75f6a 100644 --- a/FE/package.json +++ b/FE/package.json @@ -28,6 +28,7 @@ "@types/node": "^22.9.1", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", + "@types/react-helmet": "^6.1.11", "@vitejs/plugin-react": "^4.3.3", "autoprefixer": "^10.4.20", "eslint": "^9.13.0", diff --git a/FE/public/robots.txt b/FE/public/robots.txt new file mode 100644 index 00000000..f5a734c4 --- /dev/null +++ b/FE/public/robots.txt @@ -0,0 +1,2 @@ +user-agent: * +allow: / \ No newline at end of file diff --git a/FE/src/App.tsx b/FE/src/App.tsx index 9939f1f4..d9ca391b 100644 --- a/FE/src/App.tsx +++ b/FE/src/App.tsx @@ -14,6 +14,7 @@ import MyPage from 'page/MyPage'; import Rank from 'page/Rank.tsx'; import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; +import { Helmet } from 'react-helmet'; function App() { return ( @@ -35,6 +36,14 @@ export default App; function Layout() { return ( <> + + + + JuGa +
diff --git a/FE/src/components/Header.tsx b/FE/src/components/Header.tsx index a4d65d5f..ae5cec10 100644 --- a/FE/src/components/Header.tsx +++ b/FE/src/components/Header.tsx @@ -49,7 +49,7 @@ export default function Header() { type='image/webp' className={'h-[32px]'} /> - + {'Logo'}

JuGa

diff --git a/FE/src/page/Home.tsx b/FE/src/page/Home.tsx index d62a960a..abd6c99a 100644 --- a/FE/src/page/Home.tsx +++ b/FE/src/page/Home.tsx @@ -1,10 +1,15 @@ import TopFive from 'components/TopFive'; import StockIndex from 'components/StockIndex/index.tsx'; import News from 'components/News/News.tsx'; +import { Helmet } from 'react-helmet'; export default function Home() { return ( <> + + + JuGa + diff --git a/FE/src/page/MyPage.tsx b/FE/src/page/MyPage.tsx index a5e35263..3a230519 100644 --- a/FE/src/page/MyPage.tsx +++ b/FE/src/page/MyPage.tsx @@ -4,6 +4,7 @@ import MyInfo from 'components/Mypage/MyInfo'; import Nav from 'components/Mypage/Nav'; import Order from 'components/Mypage/Order'; import { useSearchParams } from 'react-router-dom'; +import { Helmet } from 'react-helmet'; export default function MyPage() { const [searchParams] = useSearchParams(); @@ -11,6 +12,10 @@ export default function MyPage() { return (
+ + + JuGa | MyPage +