Skip to content

Commit

Permalink
add sitemap e robots
Browse files Browse the repository at this point in the history
  • Loading branch information
01lexandre committed Jun 9, 2022
1 parent 45cdece commit 245892d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
9 changes: 9 additions & 0 deletions next-seo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ export default {
site: '@naweby',
cardType: 'summary_large_image',
},
robotsProps: {
nosnippet: true,
notranslate: true,
noimageindex: true,
noarchive: true,
maxSnippet: -1,
maxImagePreview: 'none',
maxVideoPreview: -1,
}
};
5 changes: 5 additions & 0 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
siteUrl: process.env.SITE_URL || 'http://www.naweby.com.br',
generateRobotsTxt: true, // (optional)
sitemapSize: 7000,
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"postbuild": "next-sitemap --config next-sitemap.config.js",
"start": "next start",
"lint": "next lint"
},
Expand Down Expand Up @@ -33,6 +34,7 @@
"devDependencies": {
"eslint": "8.12.0",
"eslint-config-next": "12.1.2",
"eslint-plugin-react-hooks": "^4.5.0"
"eslint-plugin-react-hooks": "^4.5.0",
"next-sitemap": "^3.0.5"
}
}
4 changes: 0 additions & 4 deletions public/vercel.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class MyDocument extends Document {
}

render() {
return (<Html lang={process.env.APP_LANG}>
return (<Html lang={'pt_BR'}>
<Head>
<meta charSet="utf-8"/>
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"/>
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,11 @@
dependencies:
"@chakra-ui/utils" "1.10.4"

"@corex/deepmerge@^4.0.14":
version "4.0.16"
resolved "https://registry.yarnpkg.com/@corex/deepmerge/-/deepmerge-4.0.16.tgz#2fca1db87ebdfd3faa2798cdbde1b02e73b11f4a"
integrity sha512-NjPTizUx0ovYv7WiC8Erq/yMGjc4OfSMywbEUkb1QpaBb4tgD9fe2DwRy3hfogrMZ30nWxwOtMg7hwuY67RYnQ==

"@ctrl/tinycolor@^3.4.0":
version "3.4.0"
resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz#c3c5ae543c897caa9c2a68630bed355be5f9990f"
Expand Down Expand Up @@ -2545,6 +2550,14 @@ next-seo@^5.4.0:
resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.4.0.tgz#37a7784b30b3f70cec3fa0d77f9dde5990822d24"
integrity sha512-R9DhajPwJnR/lsF2hZ8cN8uqr5CVITsRrCG1AF5+ufcaybKYOvnH8sH9MaH4/hpkps3PQ9H71S7J7SPYixAYzQ==

next-sitemap@^3.0.5:
version "3.0.5"
resolved "https://registry.yarnpkg.com/next-sitemap/-/next-sitemap-3.0.5.tgz#6c031641455356db7fac9d34b42809dd4c43d1b2"
integrity sha512-YdiW5wYNruyZCvhGGOMAdTylCQuxQkZKbSFV9Fjuf/U7aAt8lJwc3HG/WvR0n3Q1Y8c1ZiW/24UDZLQPfoKsYg==
dependencies:
"@corex/deepmerge" "^4.0.14"
minimist "^1.2.6"

[email protected]:
version "12.1.2"
resolved "https://registry.yarnpkg.com/next/-/next-12.1.2.tgz#c5376a8ae17d3e404a2b691c01f94c8943306f29"
Expand Down

0 comments on commit 245892d

Please sign in to comment.