diff --git a/packages/framework/src/Contracts/AbstractPage.php b/packages/framework/src/Contracts/AbstractPage.php index aa2d90663b5..c545714b426 100644 --- a/packages/framework/src/Contracts/AbstractPage.php +++ b/packages/framework/src/Contracts/AbstractPage.php @@ -97,6 +97,11 @@ public function __construct(string $identifier = '', FrontMatter|array $matter = { $this->identifier = $identifier; $this->matter = $matter instanceof FrontMatter ? $matter : new FrontMatter($matter); + $this->constructPageSchemas(); + } + + protected function constructPageSchemas(): void + { $this->constructPageSchema(); } diff --git a/packages/framework/src/Models/Pages/MarkdownPost.php b/packages/framework/src/Models/Pages/MarkdownPost.php index 8552e9e68db..b8a51253888 100644 --- a/packages/framework/src/Models/Pages/MarkdownPost.php +++ b/packages/framework/src/Models/Pages/MarkdownPost.php @@ -23,9 +23,13 @@ class MarkdownPost extends AbstractMarkdownPage public function __construct(string $identifier = '', ?FrontMatter $matter = null, ?Markdown $markdown = null) { parent::__construct($identifier, $matter, $markdown); + $this->constructMetadata(); + } + protected function constructPageSchemas(): void + { + parent::constructPageSchemas(); $this->constructBlogPostSchema(); - $this->constructMetadata(); } /** @deprecated v0.58.x-beta (may be moved to BlogPostSchema) */