Improve AEO and SEO for AI answer engines#2866
Open
ajnart wants to merge 1 commit into
Open
Conversation
Centralize JSON-LD helpers, fix SearchAction and license links, add llms.txt and FAQ content, and align robots/metadata for AI crawlers and filtered browse URLs.
Contributor
There was a problem hiding this comment.
Pull request overview
Centralizes JSON-LD structured data via shared schema builders/components, adds AEO surfaces (homepage FAQ, /license, llms.txt), fixes the WebSite SearchAction query param to match the app's actual ?q= URL, and tightens crawl/canonical policy for filtered browse and submit pages. Also introduces a default OG image route and replaces references to the removed og-image.png.
Changes:
- New SEO library:
lib/seo/schemas.ts(graph builders),lib/seo/metadata.ts(OG/canonical helpers),lib/seo/faqs.ts, and a reusableJsonLdcomponent; all page-level inline JSON-LD scripts switched to these helpers. - New surfaces:
/licensepage,/llms.txt, homepage FAQ section,/og/defaultand/og/community/[icon]image routes. - Crawl/canonical updates: explicit AI crawler rules in
robots.ts, filtered browse params triggernoindex+ canonical viagetFilteredBrowseMetadata,/submitisnoindex, sitemap gains/licenseand switches/iconsimage to/og/default, manifest/favicon collapsed to SVG.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/lib/seo/schemas.ts | Central @graph schema builders and license resolver. |
| web/src/lib/seo/schemas.test.ts | Vitest coverage for new builders. |
| web/src/lib/seo/metadata.ts | Default OG/Twitter image helpers and filtered browse robots/canonical. |
| web/src/lib/seo/faqs.ts | Shared FAQ data backing FAQPage schema and visible UI. |
| web/src/components/seo/json-ld.tsx | Reusable JSON-LD injector with < escaping. |
| web/src/components/home-faq.tsx | Visible FAQ section on homepage. |
| web/src/components/icon-details.tsx | Replaces CardTitle with bare <h1> and adds caption paragraph. |
| web/src/app/page.tsx | Uses shared home graph; mounts FAQ section. |
| web/src/app/layout.tsx | Uses shared default OG/Twitter images, Organization graph, SVG-only icons, llms.txt link. |
| web/src/app/icons/page.tsx | Adds searchParams-aware metadata, shared graph, Suspense around IconSearch. |
| web/src/app/icons/[icon]/page.tsx | Switches inline JSON-LD to buildIconPageGraph. |
| web/src/app/icons/external/[slug]/page.tsx | Switches inline JSON-LD to shared graph; adds source-filter breadcrumb. |
| web/src/app/community/page.tsx | Mirrors icons page metadata/graph + Suspense pattern. |
| web/src/app/community/[icon]/page.tsx | Uses shared graph; adds community OG image. |
| web/src/app/license/page.tsx | New license + trademark policy page. |
| web/src/app/og/default/route.tsx | New default OG image route. |
| web/src/app/og/community/[icon]/route.tsx | New community OG image route. |
| web/src/app/og/tests/default-route.test.ts | Tests for default OG route. |
| web/src/app/robots.ts | Adds AI crawler allow rules. |
| web/src/app/sitemap.ts | Adds /license; switches /icons image to /og/default. |
| web/src/app/submit/layout.tsx | Marks /submit noindex and sets canonical. |
| web/public/site.webmanifest | Replaces PNG icons with SVG-only. |
| web/public/llms.txt | New AEO-oriented site summary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </CardTitle> | ||
| <h1 className="text-2xl font-bold capitalize text-center mb-2">{formatedIconName}</h1> | ||
| <p className="text-sm text-muted-foreground text-center max-w-md"> | ||
| Download the {formatedIconName} icon in SVG, PNG, and WEBP formats for free. |
| breadcrumbs: [ | ||
| { name: "Home", item: WEB_URL }, | ||
| { name: "Browse Icons", item: `${WEB_URL}/icons` }, | ||
| { name: sourceConfig.label, item: `${WEB_URL}/icons?source=${sourceConfig.id}` }, |
Comment on lines
+85
to
+86
| icon: [{ url: "/favicon.svg", type: "image/svg+xml" }], | ||
| apple: [{ url: "/favicon.svg", type: "image/svg+xml" }], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JsonLdcomponent using Next.js@graphpatterns?q=, add/licensepage, replace missing OG image with/og/default, and fix sitemap/manifest asset referencesllms.txt, richer icon page structured data, and answer-first copy on icon detailsTest plan
pnpm test(866 tests passing)pnpm buildsucceeds/,/icons,/icons/{slug},/licensewith Google Rich Results Test/robots.txt,/sitemap.xml, and/llms.txtare reachable after deploy/icons?q=dockersearch works and filtered URLs are noindexed