QR-master/next-sitemap.config.js

43 lines
944 B
JavaScript

/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://www.qrmaster.net',
generateRobotsTxt: true,
robotsTxtOptions: {
policies: [
{
userAgent: '*',
allow: '/',
},
],
},
transform: async (config, path) => {
// Custom priority and changefreq based on path
let priority = 0.7;
let changefreq = 'weekly';
if (path === '/') {
priority = 0.9;
changefreq = 'daily';
} else if (path === '/blog') {
priority = 0.7;
changefreq = 'daily';
} else if (path === '/pricing') {
priority = 0.8;
changefreq = 'weekly';
} else if (path === '/faq') {
priority = 0.6;
changefreq = 'weekly';
} else if (path.startsWith('/blog/')) {
priority = 0.6;
changefreq = 'weekly';
}
return {
loc: path,
changefreq,
priority,
lastmod: new Date().toISOString(),
};
},
};