Skip to content

Commit

Permalink
Update blog post feeds to use BlogPosting Schema.org type
Browse files Browse the repository at this point in the history
This is a more specific subset of Article. See #1842
  • Loading branch information
caendesilva committed Jul 23, 2024
1 parent 2382709 commit 12001d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@php /** @var \Hyde\Pages\MarkdownPost $post */ @endphp
<article class="mt-4 mb-8" itemscope itemtype="https://schema.org/Article">
<article class="mt-4 mb-8" itemscope itemtype="https://schema.org/BlogPosting">
<meta itemprop="identifier" content="{{ $post->identifier }}">
@if(Hyde::hasSiteUrl())
<meta itemprop="url" content="{{ Hyde::url('posts/' . $post->identifier) }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 12001d9

Please sign in to comment.