robots.txt + sitemap.xml
This commit is contained in:
1 parent
5ab2084763
commit
1b77f6b2de
6 files changed
+85
-88
No files matched your search
@@ -1,6 +1,7 @@
|
||||
const withCss = require('@zeit/next-css')
|
||||
const withSass = require('@zeit/next-sass')
|
||||
const { range } = require('lodash')
|
||||
const fs = require('fs').promises
|
||||
|
||||
function createPath(page, map, query, items) {
|
||||
return items.reduce((acc, path) => {
|
||||
@@ -22,6 +23,8 @@ module.exports = withCss(withSass({
|
||||
// secondSecret: process.env.SECOND_SECRET // Pass through env variables
|
||||
},
|
||||
exportPathMap: async (defaultPathMap, { dev }) => {
|
||||
await fs.copyFile('./public/robots.txt', './dist/robots.txt')
|
||||
|
||||
if (dev) {
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user