Skip to content

Commit 125143d

Browse files
committed
fix(seo): clean up sitemap - remove login, filter default configs
1 parent 1692055 commit 125143d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/routes/sitemap.xml/+server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export const GET: RequestHandler = async ({ platform }) => {
77
const staticPages = [
88
{ path: '/', priority: '1.0', changefreq: 'weekly' },
99
{ path: '/explore', priority: '0.9', changefreq: 'daily' },
10-
{ path: '/login', priority: '0.3', changefreq: 'monthly' },
1110
{ path: '/docs/what-is-openboot', priority: '0.9', changefreq: 'weekly' }
1211
];
1312

@@ -23,10 +22,12 @@ export const GET: RequestHandler = async ({ platform }) => {
2322

2423
const env = platform?.env;
2524
if (env) {
25+
// Only include configs with meaningful slugs (exclude auto-generated 'default')
2626
const { results: publicConfigs } = await env.DB.prepare(
27-
`SELECT c.slug, u.username FROM configs c JOIN users u ON c.user_id = u.id WHERE c.visibility = 'public' ORDER BY c.install_count DESC LIMIT 500`
27+
`SELECT c.slug, u.username FROM configs c JOIN users u ON c.user_id = u.id WHERE c.visibility = 'public' AND c.slug != 'default' ORDER BY c.install_count DESC LIMIT 500`
2828
).all<{ slug: string; username: string }>();
2929

30+
// Only include user profile pages for users who have at least one non-default public config
3031
const seenUsers = new Set<string>();
3132
for (const config of publicConfigs) {
3233
if (!seenUsers.has(config.username)) {

0 commit comments

Comments
 (0)