Minor Changes
-
#3394
38d200dThanks @ttmx! - Adds thebylines:readplugin capability, which lets plugins read public byline profiles and the bylines credited on content entries throughctx.bylines.ctx.bylinesprovidesget()and cursor-paginatedlist()for profiles, plusgetEntriesBylines()for credits.getEntriesBylines()resolves up to 100 entries of one collection in a single call, so a search indexer or feed plugin can attach author names to a page ofctx.content.list()results:const page = await ctx.content.list("posts", { limit: 100 }); const credits = await ctx.bylines.getEntriesBylines( "posts", page.items.map((entry) => entry.id), );
Credits match what the site renders: the credits assigned in the editor, or the author's linked byline, marked
source: "inferred", when an entry has none. They resolve at the entry's own locale. Profiles omit the linked user account, guest flag, and byline custom field values.The capability is independent of
content:readandusers:read. It is available to native plugins and to sandboxed plugins on Cloudflare Worker Loader and Node.js workerd. Installation and update consent list it as a new permission.