Files
crosscode-platform/packages/seo/README.md
T
joshuaandClaude Opus 5.5 390b80e56e packages/seo: schema.org JSON-LD and meta helpers on @crosscode/contracts
eventJsonLd (crosscode.event/1), churchJsonLd (crosscode.church/1),
canonicalUrl, pageMeta and jsonLdString (ROADMAP-v3 §11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:01:20 +02:00

17 lines
1.3 KiB
Markdown

# @crosscode/seo
The schema.org JSON-LD builders and meta helpers every public Cross Code site uses (ROADMAP-v3
§11), built on `@crosscode/contracts`. Events, the Church Website and the Church App produce the
same search data from the same `crosscode.event/1` and `crosscode.church/1`.
| Export | What |
|--------|------|
| `eventJsonLd(event, opts)` | `Event` from a `crosscode.event/1`: status, attendance mode, `Place` / `VirtualLocation`, `offers` from `registration` (a price range when the origin passes `priceRange`), sessions as `subEvent`. **Only the origin's page** carries it; an imported copy has a canonical link to the origin instead |
| `churchJsonLd(church, opts)` | `Church` from a `crosscode.church/1`: address, geo, phone, logo, service times, social links, campuses as `department` |
| `canonicalUrl(base, path)` | Absolute, without tracking parameters (`src`, `utm_*`, `fbclid`, …), `#…` or a trailing slash |
| `pageMeta({ title, description })` | Title and description as search engines show them (60 / 155 characters) and warnings for an editor |
| `jsonLdString(data)` | JSON for `<script type="application/ld+json">`, safe against `</script>` |
Pure functions, no framework. CommonJS and ESM like contracts. It's a workspace, versioned with
the apps that use it (it isn't tagged on its own).