upstream #1
@ -38,17 +38,4 @@ module.exports = withBundleAnalyzer({
|
|||||||
|
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
async rewrites() {
|
|
||||||
return {
|
|
||||||
beforeFiles: [
|
|
||||||
// Rewrite to prevent a problem when deploying at vercel
|
|
||||||
// which directs a user to the index.xml instead of index.html
|
|
||||||
// https://github.com/timlrx/tailwind-nextjs-starter-blog/issues/16
|
|
||||||
{
|
|
||||||
source: '/',
|
|
||||||
destination: '/index',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
@ -33,7 +33,7 @@ export async function getStaticProps({ params }) {
|
|||||||
|
|
||||||
// rss
|
// rss
|
||||||
const rss = generateRss(allPosts)
|
const rss = generateRss(allPosts)
|
||||||
fs.writeFileSync('./public/index.xml', rss)
|
fs.writeFileSync('./public/feed.xml', rss)
|
||||||
|
|
||||||
return { props: { post, authorDetails, prev, next } }
|
return { props: { post, authorDetails, prev, next } }
|
||||||
}
|
}
|
||||||
|
@ -30,10 +30,10 @@ export async function getStaticProps({ params }) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// rss
|
// rss
|
||||||
const rss = generateRss(filteredPosts, `tags/${params.tag}/index.xml`)
|
const rss = generateRss(filteredPosts, `tags/${params.tag}/feed.xml`)
|
||||||
const rssPath = path.join(root, 'public', 'tags', params.tag)
|
const rssPath = path.join(root, 'public', 'tags', params.tag)
|
||||||
fs.mkdirSync(rssPath, { recursive: true })
|
fs.mkdirSync(rssPath, { recursive: true })
|
||||||
fs.writeFileSync(path.join(rssPath, 'index.xml'), rss)
|
fs.writeFileSync(path.join(rssPath, 'feed.xml'), rss)
|
||||||
|
|
||||||
return { props: { posts: filteredPosts, tag: params.tag } }
|
return { props: { posts: filteredPosts, tag: params.tag } }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user