-
Notifications
You must be signed in to change notification settings - Fork 960
feat(seo): add robots.txt, sitemap, JSON-LD, and enhanced metadata #965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a1c75d4
52b6fb1
ec84652
3db3803
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { COMPANY } from "@superset/shared/constants"; | ||
| import type { MetadataRoute } from "next"; | ||
|
|
||
| export default function robots(): MetadataRoute.Robots { | ||
| return { | ||
| rules: [ | ||
| { | ||
| userAgent: "*", | ||
| allow: "/", | ||
| disallow: ["/api/", "/_next/", "/llms.mdx/", "/llms-full.txt"], | ||
| }, | ||
| ], | ||
| sitemap: `${COMPANY.DOCS_URL}/sitemap.xml`, | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { COMPANY } from "@superset/shared/constants"; | ||
| import type { MetadataRoute } from "next"; | ||
| import { source } from "@/lib/source"; | ||
|
|
||
| export default function sitemap(): MetadataRoute.Sitemap { | ||
| const baseUrl = COMPANY.DOCS_URL; | ||
|
|
||
| const pages = source.getPages(); | ||
|
|
||
| return pages.map((page) => ({ | ||
| url: `${baseUrl}${page.url}`, | ||
| lastModified: new Date(), | ||
| changeFrequency: "weekly" as const, | ||
| priority: page.url === "/quick-start" ? 1.0 : 0.8, | ||
| })); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "name": "Superset", | ||
| "short_name": "Superset", | ||
| "description": "Run 10+ parallel coding agents on your machine", | ||
| "start_url": "/", | ||
| "display": "standalone", | ||
| "background_color": "#0a0a0a", | ||
| "theme_color": "#0a0a0a", | ||
| "icons": [ | ||
| { | ||
| "src": "/favicon-192.png", | ||
| "sizes": "192x192", | ||
| "type": "image/png" | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import { COMPANY } from "@superset/shared/constants"; | ||
| import { getBlogPosts } from "@/lib/blog"; | ||
|
|
||
| export async function GET() { | ||
| const posts = getBlogPosts(); | ||
| const baseUrl = COMPANY.MARKETING_URL; | ||
|
|
||
| const escapeXml = (str: string) => | ||
| str | ||
| .replace(/&/g, "&") | ||
| .replace(/</g, "<") | ||
| .replace(/>/g, ">") | ||
| .replace(/"/g, """) | ||
| .replace(/'/g, "'"); | ||
|
|
||
| const rss = `<?xml version="1.0" encoding="UTF-8"?> | ||
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
| <channel> | ||
| <title>Superset Blog</title> | ||
| <link>${baseUrl}/blog</link> | ||
| <description>News, updates, and insights from the Superset team about parallel coding agents and developer productivity.</description> | ||
| <language>en-us</language> | ||
| <lastBuildDate>${new Date().toUTCString()}</lastBuildDate> | ||
| <atom:link href="${baseUrl}/feed.xml" rel="self" type="application/rss+xml"/> | ||
| ${posts | ||
| .map( | ||
| (post) => ` | ||
| <item> | ||
| <title>${escapeXml(post.title)}</title> | ||
| <link>${baseUrl}/blog/${post.slug}</link> | ||
| <description>${escapeXml(post.description || "")}</description> | ||
| <pubDate>${new Date(post.date).toUTCString()}</pubDate> | ||
| <guid isPermaLink="true">${baseUrl}/blog/${post.slug}</guid> | ||
| <author>${escapeXml(post.author)}</author> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RSS Per the RSS 2.0 specification, the Consider using Option: Use dc:creator instead-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">Then in items: - <author>${escapeXml(post.author)}</author>
+ <dc:creator>${escapeXml(post.author)}</dc:creator>🤖 Prompt for AI Agents |
||
| </item>`, | ||
| ) | ||
| .join("")} | ||
| </channel> | ||
| </rss>`; | ||
|
|
||
| return new Response(rss, { | ||
| headers: { | ||
| "Content-Type": "application/xml", | ||
| "Cache-Control": "public, max-age=3600, s-maxage=3600", | ||
| }, | ||
| }); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 909
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 1646
Add 512×512 icon for proper PWA installation on Android.
The manifest only includes a 192×192 icon. PWA best practices require a 512×512 icon for Android splash screens and optimal installation experience across devices. Without it, the PWA may show degraded visuals or fail installation checks on some Android devices.
Additionally, consider adding the
"purpose"field (e.g.,"any maskable") to support adaptive icons on modern devices.📱 Recommended icon configuration
"icons": [ { "src": "/favicon-192.png", "sizes": "192x192", - "type": "image/png" + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/favicon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any maskable" } ]🤖 Prompt for AI Agents