diff --git a/resources/views/components/docs/documentation-article.blade.php b/resources/views/components/docs/documentation-article.blade.php
index 1bacc9e5..328f3709 100644
--- a/resources/views/components/docs/documentation-article.blade.php
+++ b/resources/views/components/docs/documentation-article.blade.php
@@ -1,20 +1,20 @@
@php
- $document = \Hyde\Framework\Features\Documentation\SemanticDocumentationArticle::make($page);
+ $article ??= \Hyde\Framework\Features\Documentation\SemanticDocumentationArticle::make($page);
@endphp
Hello world.
', $rendered); } + public function test_the_documentation_article_view_with_existing_variable() + { + $rendered = view('hyde::components.docs.documentation-article', [ + 'page' => $page = $this->makePage(), + 'article' => new class($page) extends SemanticDocumentationArticle + { + public function __construct(DocumentationPage $page) + { + parent::__construct($page); + } + + public function renderHeader(): HtmlString + { + return new HtmlString('Hello world.
', $rendered); + } + protected function makeArticle(string $sourceFileContents = "# Foo\n\nHello world."): SemanticDocumentationArticle { $this->file('_docs/foo.md', $sourceFileContents);