add tag routes to sitemap
This commit is contained in:
		| @@ -26,10 +26,6 @@ module.exports = withBundleAnalyzer({ | ||||
|       use: ['@svgr/webpack'], | ||||
|     }) | ||||
|  | ||||
|     if (!dev && isServer) { | ||||
|       require('./scripts/generate-sitemap') | ||||
|     } | ||||
|  | ||||
|     if (!dev && !isServer) { | ||||
|       // Replace React with Preact only in client production build | ||||
|       Object.assign(config.resolve.alias, { | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|   "scripts": { | ||||
|     "start": "next dev", | ||||
|     "dev": "next dev", | ||||
|     "build": "next build", | ||||
|     "build": "next build && node ./scripts/generate-sitemap", | ||||
|     "serve": "next start", | ||||
|     "analyze": "ANALYZE=true next build" | ||||
|   }, | ||||
|   | ||||
| @@ -9,6 +9,7 @@ const siteMetadata = require('../data/siteMetadata') | ||||
|     'pages/*.js', | ||||
|     'data/**/*.mdx', | ||||
|     'data/**/*.md', | ||||
|     'public/tags/**/*.xml', | ||||
|     '!pages/_*.js', | ||||
|     '!pages/api', | ||||
|   ]) | ||||
| @@ -21,9 +22,11 @@ const siteMetadata = require('../data/siteMetadata') | ||||
|                 const path = page | ||||
|                   .replace('pages', '') | ||||
|                   .replace('data', '') | ||||
|                   .replace('public', '') | ||||
|                   .replace('.js', '') | ||||
|                   .replace('.mdx', '') | ||||
|                   .replace('.md', '') | ||||
|                   .replace('/index.xml', '') | ||||
|                 const route = path === '/index' ? '' : path | ||||
|                 return ` | ||||
|                         <url> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user