47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
import sitemap from '@astrojs/sitemap';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: process.env.SITE_URL || 'https://agentskillshub.top',
|
|
output: 'static',
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
},
|
|
integrations: [
|
|
sitemap({
|
|
// Automatically split sitemaps into index + chunk files when exceeding entryLimit
|
|
entryLimit: 5000,
|
|
filter: (page) => {
|
|
// Quality Gate: Exclude 404, admin, preview, or thin/noindex paths from XML sitemap
|
|
const url = new URL(page);
|
|
if (url.pathname.includes('/404') || url.pathname.includes('/preview')) {
|
|
return false;
|
|
}
|
|
return true;
|
|
},
|
|
serialize: (item) => {
|
|
// Enhance sitemap entries with priority and changefreq based on page tier
|
|
if (item.url === 'https://agentskillshub.top/') {
|
|
item.priority = 1.0;
|
|
item.changefreq = 'daily';
|
|
} else if (item.url.includes('/categories/')) {
|
|
item.priority = 0.8;
|
|
item.changefreq = 'weekly';
|
|
} else if (item.url.includes('/skills/')) {
|
|
item.priority = 0.7;
|
|
item.changefreq = 'weekly';
|
|
} else if (item.url.includes('/audit/')) {
|
|
item.priority = 0.5;
|
|
item.changefreq = 'monthly';
|
|
} else {
|
|
item.priority = 0.6;
|
|
item.changefreq = 'weekly';
|
|
}
|
|
return item;
|
|
},
|
|
}),
|
|
],
|
|
});
|