Skip to content

Commit

Permalink
Merge pull request #272 from boostcampwm-2024/Feature/#271_SEO_최적화
Browse files Browse the repository at this point in the history
Feature/#271 seo 최적화
  • Loading branch information
github-actions[bot] authored Dec 2, 2024
2 parents ffdd857 + 1198d53 commit cb8c83b
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 2 deletions.
25 changes: 25 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/icons/noctaDayIcon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="밤하늘의 별빛처럼, 자유로운 인터랙션 실시간 에디터" />
<title>Nocta</title>
<meta name="keywords" content="실시간,협업,에디터,노션,마크다운" />
<meta name="author" content="Team Glassmo" />

<meta property="og:site_name" content="Nocta" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.nocta.site/" />
<meta property="og:title" content="Nocta" />
<meta
property="og:description"
content="밤하늘의 별빛처럼, 자유로운 인터랙션 실시간 에디터"
/>
<meta property="og:image" content="https://www.nocta.site/images/nocta.png" />

<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://www.nocta.site/" />
<meta property="twitter:title" content="Nocta" />
<meta
property="twitter:description"
content="밤하늘의 별빛처럼, 자유로운 인터랙션 실시간 에디터"
/>
<meta property="twitter:image" content="https://www.nocta.site/images/nocta.png" />

<meta name="robots" content="index, follow" />
<link rel="canonical" href="https://www.nocta.site/" />
</head>

<body>
Expand Down
Binary file added client/public/images/nocta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions client/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://www.nocta.site/sitemap.xml
9 changes: 9 additions & 0 deletions client/public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.nocta.site</loc>
<lastmod>2024-12-02</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
</urlset>
1 change: 1 addition & 0 deletions client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export default defineConfig({
resolve: {
alias: { "@noctaCrdt": path.resolve(__dirname, "../@noctaCrdt") },
},
publicDir: "public",
});
12 changes: 12 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ server {
# HSTS 설정 (HTTPS 강제)
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

location = /robots.txt {
root /usr/share/nginx/html; # React 빌드 결과물이 있는 디렉토리
access_log off;
add_header Cache-Control "public, max-age=86400"; # 24시간 캐싱
}

location = /sitemap.xml {
root /usr/share/nginx/html;
access_log off;
add_header Cache-Control "public, max-age=86400";
}

# /api 경로로 들어오는 요청은 백엔드로 전달
location /api {
proxy_pass http://backend; # 백엔드로 요청 전달
Expand Down
10 changes: 10 additions & 0 deletions nginx/default.dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ upstream frontend {
server {
listen 80;

location = /robots.txt {
proxy_pass http://frontend; # 개발 서버로 전달
access_log off;
}

location = /sitemap.xml {
proxy_pass http://frontend;
access_log off;
}

# /api 경로로 들어오는 요청은 백엔드로 전달
location /api {
proxy_pass http://backend; # 백엔드로 요청 전달
Expand Down
42 changes: 40 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb8c83b

Please sign in to comment.