this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: strip directory prefix and .pub extension from document path slug

+4 -2
+4 -2
packages/cli/src/lib/atproto.ts
··· 282 282 const parsed = parseAtUri(atUri); 283 283 284 284 if (parsed) { 285 - const finalPath = `/pub/${parsed.rkey}/${post.slug}`; 285 + const slugName = post.slug.split("/").pop()!.replace(/\.pub$/, ""); 286 + const finalPath = `/pub/${parsed.rkey}/${slugName}`; 286 287 record.path = finalPath; 287 288 record.canonicalUrl = config.canonicalUrlBuilder 288 289 ? config.canonicalUrlBuilder(atUri, post) ··· 314 315 315 316 const [, , collection, rkey] = uriMatch; 316 317 317 - const finalPath = `/pub/${rkey}/${post.slug}`; 318 + const slugName = post.slug.split("/").pop()!.replace(/\.pub$/, ""); 319 + const finalPath = `/pub/${rkey}/${slugName}`; 318 320 const publishDate = new Date(post.frontmatter.publishDate); 319 321 const trimmedContent = post.content.trim(); 320 322 const textContent = getTextContent(post, config.textContentField);