From 12001d9dea7bc2c0a6570acb49c139eb3b3e40d2 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Tue, 23 Jul 2024 18:39:21 +0200 Subject: [PATCH] Update blog post feeds to use `BlogPosting` Schema.org type This is a more specific subset of Article. See https://github.com/hydephp/develop/issues/1842 --- RELEASE_NOTES.md | 2 +- .../resources/views/components/article-excerpt.blade.php | 2 +- packages/framework/tests/Unit/Views/ArticleExcerptViewTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d5ce619590d..b4899c03a0c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -39,7 +39,7 @@ This serves two purposes: - Minor: `Includes::path()` and `Includes::get()` methods now normalizes paths to be basenames to match the behaviour of the other include methods in https://github.com/hydephp/develop/pull/1738. This means that nested directories are no longer supported, as you should use a data collection for that. - Minor: The `processing_time_ms` attribute in the `sitemap.xml` file has now been removed in https://github.com/hydephp/develop/pull/1744 - Minor: Updated the `Hyde::url()` helper to return `null` instead of throwing a `BaseUrlNotSetException` when no site URL is set and no path was provided to the method in https://github.com/hydephp/develop/pull/1760 -- Minor: Updated the blog post layout to use the `BlogPosting` Schema.org type instead of `Article` in https://github.com/hydephp/develop/pull/1887 +- Minor: Updated the blog post layout and post feed component to use the `BlogPosting` Schema.org type instead of `Article` in https://github.com/hydephp/develop/pull/1887 - Overhauled the blog post author feature in https://github.com/hydephp/develop/pull/1782 - Improved the sitemap data generation to be smarter and more dynamic in https://github.com/hydephp/develop/pull/1744 - Skipped build tasks will now exit with an exit code of 3 instead of 0 in https://github.com/hydephp/develop/pull/1749 diff --git a/packages/framework/resources/views/components/article-excerpt.blade.php b/packages/framework/resources/views/components/article-excerpt.blade.php index 666c628ab0f..3e4574f2343 100644 --- a/packages/framework/resources/views/components/article-excerpt.blade.php +++ b/packages/framework/resources/views/components/article-excerpt.blade.php @@ -1,5 +1,5 @@ @php /** @var \Hyde\Pages\MarkdownPost $post */ @endphp -
+
@if(Hyde::hasSiteUrl()) diff --git a/packages/framework/tests/Unit/Views/ArticleExcerptViewTest.php b/packages/framework/tests/Unit/Views/ArticleExcerptViewTest.php index 48e1818fcf0..508b009f5cd 100644 --- a/packages/framework/tests/Unit/Views/ArticleExcerptViewTest.php +++ b/packages/framework/tests/Unit/Views/ArticleExcerptViewTest.php @@ -24,7 +24,7 @@ protected function renderTestView(MarkdownPost $post): string public function testComponentCanBeRendered() { $view = $this->renderTestView(MarkdownPost::make()); - $this->assertStringContainsString('https://schema.org/Article', $view); + $this->assertStringContainsString('https://schema.org/BlogPosting', $view); } public function testComponentRendersPostData()