diff --git a/app/Models/Article.php b/app/Models/Article.php index 90f0585f6..4c8adfa66 100644 --- a/app/Models/Article.php +++ b/app/Models/Article.php @@ -327,7 +327,8 @@ public static function nextForSharing(): ?self public static function getFeedItems(): Collection { - return self::paginate(self::FEED_PAGE_SIZE) + return self::published() + ->paginate(self::FEED_PAGE_SIZE) ->getCollection(); } @@ -338,7 +339,7 @@ public function toFeedItem(): FeedItem ->title($this->title()) ->summary($this->excerpt()) ->updated($this->updatedAt()) - ->link(route('articles', $this->slug())) + ->link(route('articles.show', $this->slug())) ->authorName($this->author()->name()); } }