(siteUrl: string, data: BlogPostDocument)
| 170 | } |
| 171 | |
| 172 | function 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 |
no test coverage detected