Skip to content

Commit 03c7ed3

Browse files
author
CloudLobster
committed
fix: add blog posts to sitemap.xml for SEO indexing
1 parent 1f7891e commit 03c7ed3

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

web/functions/sitemap.xml.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,31 @@ export const onRequest: PagesFunction<Env> = async () => {
2323

2424
const staticUrls = [
2525
{ loc: 'https://basemail.ai/', priority: '1.0', changefreq: 'weekly' },
26+
{ loc: 'https://basemail.ai/blog/', priority: '0.8', changefreq: 'weekly' },
2627
];
2728

29+
// Blog posts
30+
const blogPosts = [
31+
'basemail-vs-agentmail',
32+
'why-agents-need-onchain-identity',
33+
'erc-8004-agent-email-resolution',
34+
'attention-bonds-quadratic-funding-spam',
35+
'openclaw-agent-email-tutorial',
36+
'lens-protocol-agent-social-graph',
37+
];
38+
const blogUrls = blogPosts.map(slug => ({
39+
loc: `https://basemail.ai/blog/${slug}/`,
40+
priority: '0.8',
41+
changefreq: 'monthly',
42+
}));
43+
2844
const agentUrls = agents.map(h => ({
2945
loc: `https://basemail.ai/agent/${h}`,
3046
priority: '0.7',
3147
changefreq: 'weekly',
3248
}));
3349

34-
const allUrls = [...staticUrls, ...agentUrls];
50+
const allUrls = [...staticUrls, ...blogUrls, ...agentUrls];
3551

3652
const xml = `<?xml version="1.0" encoding="UTF-8"?>
3753
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

0 commit comments

Comments
 (0)