Rename contact route slug
This commit is contained in:
@@ -4,7 +4,7 @@ const staticPages=[];
|
||||
const seoByPath={
|
||||
'/':{changefreq:'daily',priority:1},
|
||||
'/about-us':{changefreq:'monthly',priority:0.6},
|
||||
'/tmas-bama':{changefreq:'monthly',priority:0.5},
|
||||
'/contact-us':{changefreq:'monthly',priority:0.5},
|
||||
'/blog':{changefreq:'weekly',priority:0.7},
|
||||
};
|
||||
async function scan(dir,parts=[]){for(const entry of await readdir(dir,{withFileTypes:true})){if(entry.isDirectory()&&!entry.name.startsWith('[')&&!entry.name.startsWith('_')&&!['api','account','admin','login','cart','checkout'].includes(entry.name))await scan(path.join(dir,entry.name),entry.name.startsWith('(')?parts:[...parts,entry.name]);else if(entry.isFile()&&/^page\.(tsx|jsx|js|ts)$/.test(entry.name)){const route='/'+parts.join('/');staticPages.push({path:route,...(seoByPath[route]||{changefreq:'monthly',priority:0.6})})}}}
|
||||
|
||||
Reference in New Issue
Block a user