MCPcopy
hub / github.com/npmx-dev/npmx.dev / resolveAuthors

Function resolveAuthors

modules/blog.ts:77–83  ·  view source on GitHub ↗

* Resolves authors with their Bluesky avatars and profile URLs.

(authors: Author[], avatarMap: Map<string, string>)

Source from the content-addressed store, hash-verified

75 * Resolves authors with their Bluesky avatars and profile URLs.
76 */
77function resolveAuthors(authors: Author[], avatarMap: Map<string, string>): ResolvedAuthor[] {
78 return authors.map(author => ({
79 ...author,
80 avatar: author.blueskyHandle ? (avatarMap.get(author.blueskyHandle) ?? null) : null,
81 profileUrl: author.blueskyHandle ? `https://bsky.app/profile/${author.blueskyHandle}` : null,
82 }))
83}
84
85/**
86 * Scans the blog directory for .md files and extracts validated frontmatter.

Callers 1

loadBlogPostsFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected