From e4b3a5f68d00b6cbe9a1070c6afd2c49a7750c17 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 18 Feb 2019 14:01:58 -0500 Subject: [PATCH] AP: Fix post ID --- lib/generate/activitypub.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/generate/activitypub.ts b/lib/generate/activitypub.ts index 6de701a..6f36aaa 100644 --- a/lib/generate/activitypub.ts +++ b/lib/generate/activitypub.ts @@ -29,7 +29,11 @@ function postObject(post: Page): object { "https://www.w3.org/ns/activitystreams" ], "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": (postMeta.date).toISOString(), "inReplyTo": null, "url": `https://${baseURL}${postMeta.permalink}`,