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

Function buildATProtoDocument

modules/standard-site-sync.ts:172–182  ·  view source on GitHub ↗
(siteUrl: string, data: BlogPostDocument)

Source from the content-addressed store, hash-verified

170}
171
172function buildATProtoDocument(siteUrl: string, data: BlogPostDocument) {
173 return site.standard.document.$build({
174 site: `at://${NPMX_DEV_DID}/site.standard.publication/${npmxPublicationRkey()}`,
175 path: data.path,
176 title: data.title,
177 description: data.description ?? data.excerpt,
178 tags: data.tags,
179 // Publish on the record with the current date
180 publishedAt: toDatetimeString(new Date()),
181 })
182}
183
184/*
185 * Loads a record to atproto and ensures uniqueness by checking the date the article is published

Callers 1

syncFileFunction · 0.85

Calls 1

npmxPublicationRkeyFunction · 0.90

Tested by

no test coverage detected