chore: add publication filter for /now rss feed
1b214cfc
2 file(s) · +10 −4
| 51 | 51 | ||
| 52 | 52 | const data = (await response.json()) as ListRecordsResponse; |
|
| 53 | 53 | ||
| 54 | - | // Filter out main-blog posts |
|
| 54 | + | // Only include documents from the site publication, excluding blog posts |
|
| 55 | 55 | const filteredDocuments = data.records.filter( |
|
| 56 | - | (doc) => !doc.value?.path?.includes("/posts"), |
|
| 56 | + | (doc) => |
|
| 57 | + | doc.value?.site === |
|
| 58 | + | "at://did:plc:ia2zdnhjaokf5lazhxrmj6eu/site.standard.publication/3mbykzswhqc2x" && |
|
| 59 | + | !doc.value?.path?.includes("/posts"), |
|
| 57 | 60 | ); |
|
| 58 | 61 | ||
| 59 | 62 | // Sort by publishedAt descending |
| 383 | 383 | ||
| 384 | 384 | const data = (await response.json()) as ListRecordsResponse; |
|
| 385 | 385 | ||
| 386 | - | // Filter out main-blog posts |
|
| 386 | + | // Only include documents from the site publication, excluding blog posts |
|
| 387 | 387 | const documents = data.records.filter( |
|
| 388 | - | (doc) => !doc.value?.path?.includes("/posts"), |
|
| 388 | + | (doc) => |
|
| 389 | + | doc.value?.site === |
|
| 390 | + | "at://did:plc:ia2zdnhjaokf5lazhxrmj6eu/site.standard.publication/3mbykzswhqc2x" && |
|
| 391 | + | !doc.value?.path?.includes("/posts"), |
|
| 389 | 392 | ); |
|
| 390 | 393 | ||
| 391 | 394 | // Create the feed |