Skip to content

Commit

Permalink
Merge pull request #30 from SkyLightQP/develop
Browse files Browse the repository at this point in the history
feat: add sitemap, robots and some meta tag for SEO
  • Loading branch information
SkyLightQP authored Nov 14, 2024
2 parents 143bc93 + 5573a27 commit be840bd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
5 changes: 0 additions & 5 deletions public/robots.txt

This file was deleted.

1 change: 1 addition & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const RootLayout: FC<PropsWithChildren> = ({ children }) => {
<head>
<title>하대겸 | Daegyeom Ha</title>
<meta charSet="utf-8" />
<meta name="naver-site-verification" content="dbd9d288a0e114ae1755011385c261259e8a67a2" />
<Script
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2490453096003621"
crossOrigin="anonymous"
Expand Down
12 changes: 12 additions & 0 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
disallow: ['/admin/', '/admin/content/', '/admin/login/']
},
sitemap: 'https://daegyeo.me/sitemap.xml'
};
}
12 changes: 12 additions & 0 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MetadataRoute } from 'next';

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: 'https://daegyeo.me',
lastModified: new Date(),
changeFrequency: 'monthly',
priority: 1
}
];
}
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export const config = {
* - favicon.ico (favicon file)
* Feel free to modify this pattern to include more paths.
*/
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)'
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|txt)$).*)'
]
};

0 comments on commit be840bd

Please sign in to comment.