Skip to content

Commit 80a2f1b

Browse files
committed
Exclude cover image from feed
1 parent f8bb5b9 commit 80a2f1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/php/de/thekid/dialog/Repository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function authenticate(string $user, Secret $secret): ?Document {
3131
/** Returns newest entries */
3232
public function newest(int $limit): array<Document> {
3333
$cursor= $this->database->collection('entries')->aggregate([
34-
['$match' => ['is.journey' => ['$ne' => true], 'published' => ['$lt' => Date::now()]]],
34+
['$match' => ['is.content' => ['$eq' => true], 'published' => ['$lt' => Date::now()]]],
3535
['$unset' => '_searchable'],
3636
['$sort' => ['date' => -1]],
3737
['$limit' => $limit],
@@ -53,7 +53,7 @@ public function journeys(): array<Document> {
5353
/** Returns paginated entries */
5454
public function entries(Pagination $pagination, int $page): array<Document> {
5555
$cursor= $this->database->collection('entries')->aggregate([
56-
['$match' => ['is.journey' => ['$ne' => true], 'published' => ['$lt' => Date::now()]]],
56+
['$match' => ['is.content' => ['$eq' => true], 'published' => ['$lt' => Date::now()]]],
5757
['$unset' => '_searchable'],
5858
['$sort' => ['date' => -1]],
5959
['$skip' => $pagination->skip($page)],

src/main/php/de/thekid/dialog/import/Sources.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function items(Folder $origin): iterable {
6464
'keywords' => $d->meta['keywords'] ?? [],
6565
'locations' => isset($d->meta['location']) ? [$d->meta['location']] : $d->meta['locations'],
6666
'content' => $d->content,
67-
'is' => ['content' => true],
67+
'is' => ['cover' => true],
6868
];
6969
}
7070
};

0 commit comments

Comments
 (0)