improvement(library): single JSON-LD source, Markdown articles, and IndexNow pings
Merged
WA
6d ago+595+595+012345678901234567890123456789-59-59-01234567890123456789
Summary
- Library and blog posts emit structured data only as JSON-LD: removed the duplicate microdata
BlogPosting(publisher as plain text) andFAQPagefrom the post layout and FAQ. Markup is unchanged apart from the attributes, an empty<meta>branch, and an empty FAQ wrapper div. Thespeakableselectors now point atdata-speakablehooks instead of the removeditemprops BlogPostinggets@id(<canonical>#article) andisPartOf→ the siteWebSitenode (#website). Authors link to their on-site profile (urlplus a shared@idthat the author page'sPersonnode uses too), and their external profile stays insameAs- Library articles are served as Markdown at
/library/<slug>.mdand at/library/<slug>forAccept: text/markdown(afterFiles rewrites, so/library/tagsand the feeds are untouched). Responses carryVary: Accept, areno-storelike the HTML page, and send a canonicalLinkheader. Drafts and unknown slugs return a Markdown 404. Post pages advertise<link rel="alternate" type="text/markdown">, and llms.txt notes the.mdconvention (matching docs) - Blog and library post pages advertise their RSS feed.
buildPostMetadatanow takes the section at every call site - IndexNow: a public key file under
apps/sim/public, andscripts/ping-indexnow.ts, which submits the library and comparison URLs whose source changed between the previous and newmainhead (renamed and deleted posts included, drafts never; every comparison when Sim's own profile changes). A newindexnowjob runs it aftertrigger-promoteconfirms the prod cutover. The job usescontinue-on-errorwith a 5-minute timeout, nothing depends on it, and it skips when nothing changed
Type of Change
- Improvement
Testing
scripts/ping-indexnow.test.ts(6 cases against a real git repo). Mutation-checked: removing the draft guard, rename handling, sim-profile fan-out, or profile-id lookup each turns a case red- Dry run of URL collection on the last
mainrelease: 5 library URLs, no request sent - Extended
test-landing-seo-e2e.ts(CI's seo HTTP group):.mdandAcceptnegotiation, Vary, no-store, canonical Link, alternates,/library/tagsstill HTML, Markdown 404, no microdata,@id/isPartOf/author@idcross-page match, and speakable selectors resolve. The live site fails these checks before this change (verified with curl) - Existing tests:
content-routing.test.tsx,customers/page.test.tsx,lib/content/*(145 passing),dev-deployment-workflow,desktop-prune-workflow bun run lint, check:comment-hygiene, source-conventions, file-names, site-urls, library-content, client-boundary, boundaries, unused-exports, utils, test-patterns. type-check and check:audits are left to CI
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the
test-auditauthoring gate) - No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)