feat(docs): improve SEO metadata, structured data, and crawlability#615
Open
zahlekhan wants to merge 1 commit into
Open
feat(docs): improve SEO metadata, structured data, and crawlability#615zahlekhan wants to merge 1 commit into
zahlekhan wants to merge 1 commit into
Conversation
Organic search is the docs site's #2 traffic channel and growing fast, but several gaps were leaking that growth. This adds: - Sitemap: include /openclaw-os (a top page that was missing), use real blog publish dates for lastmod, and set monthly changefreq for blog posts - Blog posts: dynamic per-post OG images (mirrors the existing docs OG route), plus full og:type=article / Twitter card / canonical metadata - Docs pages: explicit canonical, article OG, and Twitter card - Playground: page-specific title/description/canonical (was inheriting the generic homepage title) - JSON-LD: SoftwareApplication + Organization (home), BlogPosting + breadcrumbs (blog), TechArticle + breadcrumbs (docs) - PWA manifest and proper PNG icons (apple-touch-icon, 192/512, favicon-32) - Global: @thesysdev Twitter handle, og:locale, themeColor viewport Generated-By: PostHog Code Task-Id: 134200f7-d774-431c-b7b4-ff6281467d1a
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
Organic search is the docs site's #2 traffic channel and growing fast — Google referrals went ~3.5k → 40k pageviews/mo (Mar→May, PostHog project 79652), roughly 10×. Several gaps were leaking that growth. This PR is a comprehensive but low-risk metadata / structured-data pass, all confined to the
docs/app.Changes
app/sitemap.ts): include/openclaw-os(a top-7 page with 17k views that was missing from the sitemap), use real blog publish dates forlastmod(was always "today"), and setmonthlychangefreq for blog posts.app/og/blog/[...slug]/route.tsx(mirrors the existing docs OG route +getBlogImagehelper), plus fullog:type=article/publishedTime/ authors / Twitter card / canonical metadata (previously onlytitle+description, so all posts shared the generic site image).app/docs/[[...slug]]/page.tsx): explicitcanonical, article OG, and Twitter card.app/playground/layout.tsx): page-specific title/description/canonical — it was the Components by AD #2 page overall (46k views) but inherited the generic homepage title.SoftwareApplication+Organization(home),BlogPosting+BreadcrumbList(blog),TechArticle+BreadcrumbList(docs), via a small sharedcomponents/seo/JsonLd.tsx.app/manifest.tsplus real PNG icons (apple-touch-icon.png180×180,icon-192/512.png,favicon-32.png) generated fromfavicon.svg.app/layout.tsx):@thesysdevTwitter handle,og:locale, PNG favicon fallback, and athemeColorviewport.hreflangwas intentionally skipped — thezh-CNtranslations aren't served as live routes yet, so it would point at nonexistent URLs.Verification
pnpm buildpasses; new routes (/manifest.webmanifest,/og/blog/[...slug]) compile and prerender./openclaw-osand real bloglastmod; blog/docs/playground pages emit correct canonical + OG + Twitter tags; OG blog card renders (344KB webp); JSON-LD blocks present on home/blog/docs.pnpm lint: no new errors introduced (pre-existing "setState within effect" errors only, in untouched interactive components).Suggested follow-up
/openclaw-osimpressions + the organic trend in PostHog.Created with PostHog Code