feat(seo): canonical, social cards, robots and sitemap - #42
Merged
Conversation
The site had a title and a description and nothing else. No canonical, no Open Graph, no Twitter card, and /robots.txt and /sitemap.xml both 404, so a shared link rendered as a bare URL and crawlers had no guidance. - layout metadata: metadataBase, canonical, Open Graph, Twitter summary card, explicit robots directives, and a title template for subpages. - app/robots.ts: allow the landing, keep crawlers out of the wallet-gated dashboard and admin views and the agent endpoints under /api, /knowledge and /skill. - app/sitemap.ts: the landing, which is the only public page. - public/og.png: a 1200x630 card in the site's own palette. - JSON-LD on the landing (WebSite, Organization, SoftwareApplication) so search engines and assistants describe the service accurately. Build verified: /robots.txt and /sitemap.xml are emitted as static routes.
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.
Why
The site shipped with a title and a description and nothing else:
/robots.txtand/sitemap.xmlboth returned 404What changed
app/layout.tsx:metadataBase, canonical, Open Graph (with image), Twittersummary_large_image, explicit robots directives includingmax-image-preview: large, and a title template so future pages inherit the suffix.app/robots.ts: allow the landing; disallow/admin,/dashboard,/api/,/knowledge/,/skill/and/healthz, which are either wallet-gated or agent endpoints rather than pages.app/sitemap.ts: the landing, the only public page today.public/og.png: a 1200x630 card built in the site's own palette (accent#7cf7c8, background#08110f), carrying the same message as the hero.WebSite,OrganizationandSoftwareApplication, limited to what the page itself claims.Verification
npx next buildsucceeds and lists○ /robots.txtand○ /sitemap.xmlas static routes. Typecheck reports nothing in the touched files.Deploy note: served from the VPS, needs a manual deploy after merge.