AP: Fix post ID

This commit is contained in:
Shadowfacts 2019-02-18 14:01:58 -05:00
parent 320ba3fc67
commit e4b3a5f68d
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,11 @@ function postObject(post: Page): object {
"https://www.w3.org/ns/activitystreams" "https://www.w3.org/ns/activitystreams"
], ],
"type": "Article", "type": "Article",
"id": `https://${baseURL}${postMeta.permalink}.json`, "id": `https://${baseURL}${path.format({
dir: path.dirname(post.metadata.permalink),
name: path.basename(post.metadata.permalink),
ext: ".json"
})}`,
"published": (<Date>postMeta.date).toISOString(), "published": (<Date>postMeta.date).toISOString(),
"inReplyTo": null, "inReplyTo": null,
"url": `https://${baseURL}${postMeta.permalink}`, "url": `https://${baseURL}${postMeta.permalink}`,