feat: auto robots.txt and sitemap gen

This commit is contained in:
Kim, Jimin 2023-07-29 11:48:16 +09:00
parent acf1ee7f9e
commit 6ba8a7f3cb
Signed by: pomp
GPG key ID: CE1DDB8A4A765403
8 changed files with 44 additions and 8 deletions

1
.npmrc
View file

@ -1,3 +1,4 @@
auto-install-peers = true
node-linker=hoisted
prefer-symlinked-executables=false
enable-pre-post-scripts=true

View file

@ -0,0 +1,8 @@
// https://next-sitemap.iamvishnusankar.com/docs/documentation/configuration
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://blog.developomp.com",
generateRobotsTxt: true,
outDir: "build",
priority: 0.8,
}

View file

@ -5,6 +5,7 @@
"scripts": {
"dev": "open-cli http://localhost:3000 && next dev",
"build": "next build",
"postbuild": "next-sitemap",
"serve": "serve build --listen 3000",
"lint": "next lint",
"test:e2e": "playwright test",
@ -38,6 +39,7 @@
"highlight.js": "^11.8.0",
"katex": "^0.16.8",
"next": "13.4.12",
"next-sitemap": "^4.1.8",
"open-cli": "^7.2.0",
"postcss": "8.4.27",
"prettier": "^2.8.8",

View file

@ -1,4 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Allow: /
Disallow:

View file

@ -0,0 +1,8 @@
// https://next-sitemap.iamvishnusankar.com/docs/documentation/configuration
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://portfolio.developomp.com",
generateRobotsTxt: true,
outDir: "dist",
priority: 0.8,
}

View file

@ -38,6 +38,7 @@
"highlight.js": "^11.8.0",
"katex": "^0.16.8",
"next": "13.4.12",
"next-sitemap": "^4.1.8",
"open-cli": "^7.2.0",
"postcss": "8.4.27",
"prettier": "^2.8.8",

View file

@ -1,4 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Allow: /
Disallow:

24
pnpm-lock.yaml generated
View file

@ -110,6 +110,9 @@ importers:
next:
specifier: 13.4.12
version: 13.4.12(react-dom@18.2.0)(react@18.2.0)
next-sitemap:
specifier: ^4.1.8
version: 4.1.8(next@13.4.12)
open-cli:
specifier: ^7.2.0
version: 7.2.0
@ -314,6 +317,9 @@ importers:
next:
specifier: 13.4.12
version: 13.4.12(react-dom@18.2.0)(react@18.2.0)
next-sitemap:
specifier: ^4.1.8
version: 4.1.8(next@13.4.12)
open-cli:
specifier: ^7.2.0
version: 7.2.0
@ -580,6 +586,10 @@ packages:
regenerator-runtime: 0.13.11
dev: true
/@corex/deepmerge@4.0.43:
resolution: {integrity: sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==}
dev: true
/@esbuild/android-arm64@0.18.11:
resolution: {integrity: sha512-snieiq75Z1z5LJX9cduSAjUr7vEI1OdlzFPMw0HH5YI7qQHDd3qs+WZoMrWYDsfRJSq36lIA6mfZBkvL46KoIw==}
engines: {node: '>=12'}
@ -5395,6 +5405,20 @@ packages:
engines: {node: '>= 0.6'}
dev: true
/next-sitemap@4.1.8(next@13.4.12):
resolution: {integrity: sha512-XAXpBHX4o89JfMgvrm0zimlZwpu2iBPXHpimJMUrqOZSc4C2oB1Lv89mxuVON9IE8HOezaM+w4GjJxcYCuGPTQ==}
engines: {node: '>=14.18'}
hasBin: true
peerDependencies:
next: '*'
dependencies:
'@corex/deepmerge': 4.0.43
'@next/env': 13.4.12
fast-glob: 3.3.1
minimist: 1.2.8
next: 13.4.12(react-dom@18.2.0)(react@18.2.0)
dev: true
/next@13.4.12(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-eHfnru9x6NRmTMcjQp6Nz0J4XH9OubmzOa7CkWL+AUrUxpibub3vWwttjduu9No16dug1kq04hiUUpo7J3m3Xw==}
engines: {node: '>=16.8.0'}