Sitemap: renamed server-sitemap to sitemap; added caching; set up redirect for retro-compatibility (#76)

This commit is contained in:
Giancarlo Buomprisco
2024-10-25 11:26:02 +02:00
committed by GitHub
parent c00ec761d3
commit 2209e2988b
3 changed files with 96 additions and 64 deletions

View File

@@ -39,6 +39,7 @@ const config = {
outputFileTracingIncludes: {
'/*': ['./content/**/*'],
},
redirects: getRedirects,
experimental: {
mdxRs: true,
reactCompiler: ENABLE_REACT_COMPILER,
@@ -95,6 +96,16 @@ function getRemotePatterns() {
];
}
async function getRedirects() {
return [
{
source: '/server-sitemap.xml',
destination: '/sitemap.xml',
permanent: true,
},
];
}
/**
* @description Aliases modules based on the environment variables
* This will speed up the development server by not loading the modules that are not needed