(data: unknown)
| 164 | |
| 165 | // Keys are sorted to provide a more stable hash |
| 166 | function createContentHash(data: unknown): string { |
| 167 | return createHash('sha256') |
| 168 | .update(JSON.stringify(data, Object.keys(data as object).sort())) |
| 169 | .digest('hex') |
| 170 | } |
| 171 | |
| 172 | function buildATProtoDocument(siteUrl: string, data: BlogPostDocument) { |
| 173 | return site.standard.document.$build({ |