minor2026-09-05

Blog

v2.2.0Reader engagement

Added

  • @vlozi/blog/engage — a new client entry for reader engagement, independent of the rest of the SDK. No API key, no VloziClient; importable on its own in any React app.
    • <EngagementBeacon> records views, and a separate read signal once a reader has actually dwelled and scrolled.
    • <ViewCount>, <Reactions>, <StarRating>, <Helpful> — display and voting widgets.
    • <Comments> — the full thread: list, one level of replies, form with honeypot and Turnstile, reporting, and a five-minute window to fix your own typo.
    • <SignInWithEmail> and useMember — passwordless reader sign-in. No password, no account, no cookie.
    • <ReadingNow> and useTrendingPosts — live concurrent readers, and a most-viewed list with titles attached.
    • useEngagementSummary, useReaction, useComments, useEngageSiteConfig.
    • postTarget(post), engagementJsonLd(post, summary), productRatingJsonLd(summary).
  • <ServerComments> in @vlozi/blog/server — a read-only, server-rendered comment thread for ISR and static pages, so the discussion is in the HTML rather than arriving only after JavaScript runs.
  • Post.id is now returned by the public API, on both the list and detail shapes. Prefer it over slug as a stable key — a slug changes when an author renames a post, an id never does.
  • renderFooter slot on <BlogPost> and <BlogCard>, as the mount point for engagement widgets.

Notes

  • Counters on one page are batched into a single request. A twelve-post index costs one call, not twelve.
  • The engage entry has its own 8 KB brotli budget, enforced in CI, and is deliberately independent of @vlozi/blog/react — importing a view counter doesn't pull in the blog renderer.
  • engagementJsonLd does not emit aggregateRating, and won't. Star ratings on your own article are self-serving review markup that Google ignores and can penalise. productRatingJsonLd covers the legitimate Product case.