Skip to content

Commit

Permalink
Merge pull request #633 from hydephp/update-schemas-to-https
Browse files Browse the repository at this point in the history
Change schema.org identifiers to use https
  • Loading branch information
caendesilva authored Oct 31, 2022
2 parents 65b5c13 + 9786656 commit 6f2ffa4
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @var \Hyde\Pages\MarkdownPost $post */
@endphp

<article class="mt-4 mb-8" itemscope itemtype="http://schema.org/Article">
<article class="mt-4 mb-8" itemscope itemtype="https://schema.org/Article">
<meta itemprop="identifier" content="{{ $post->identifier }}">
@if(Hyde::hasSiteUrl())
<meta itemprop="url" content="{{ Hyde::url('posts/' . $post->identifier) }}">
Expand All @@ -24,7 +24,7 @@
</span>
@endisset
@isset($post->author)
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
<span class="opacity-75">by</span>
<span itemprop="name">
{{ $post->author->name ?? $post->author->username }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'document',
])

<article id="document" itemscope itemtype="http://schema.org/Article" @class([
<article id="document" itemscope itemtype="https://schema.org/Article" @class([
'mx-auto lg:ml-8 prose dark:prose-invert max-w-3xl p-12 md:px-16 max-w-[1000px] min-h-[calc(100vh_-_4rem)]',
'torchlight-enabled' => $document->hasTorchlight()])>
@yield('content')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<article aria-label="Article" id="{{ Hyde::url("posts/$page->identifier", '') }}" itemscope
itemtype="http://schema.org/Article"
itemtype="https://schema.org/Article"
@class(['post-article mx-auto prose dark:prose-invert', 'torchlight-enabled' => Hyde\Facades\Features::hasTorchlight()])>
<meta itemprop="identifier" content="{{ $page->identifier }}">
@if(Hyde::hasSiteUrl())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
by author
<address itemprop="author" itemscope itemtype="http://schema.org/Person" aria-label="The post author" style="display: inline;">
<address itemprop="author" itemscope itemtype="https://schema.org/Person" aria-label="The post author" style="display: inline;">
@if($page->author->website)
<a href="{{ $page->author->website }}" rel="author" itemprop="url" aria-label="The author's website">
@endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
/** @var \Hyde\Framework\Features\Blogging\Models\FeaturedImage $image */
$image = $page->image;
@endphp
<figure aria-label="Cover image" itemprop="image" itemscope itemtype="http://schema.org/ImageObject" role="doc-cover">
<figure aria-label="Cover image" itemprop="image" itemscope itemtype="https://schema.org/ImageObject" role="doc-cover">
<img src="{{ $image->getSource() }}" alt="{{ $image->getAltText() ?? '' }}" title="{{ $image->getTitleText() ?? '' }}"
itemprop="image" class="mb-0">
<figcaption aria-label="Image caption" itemprop="caption">
@if($image->hasAuthorName())
<span>Image by</span>
<span itemprop="creator" itemscope="" itemtype="http://schema.org/Person">
<span itemprop="creator" itemscope="" itemtype="https://schema.org/Person">
@if($image->hasAuthorUrl())
<a href="{{ $image->getAuthorUrl() }}" rel="author noopener nofollow" itemprop="url">
<span itemprop="name">{{ $image->getAuthorName() }}</span>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public function test_post_contains_expected_meta_tags()
public function test_post_contains_expected_itemprops()
{
$this->inspectHtml([
'itemtype="http://schema.org/Article"',
'itemtype="http://schema.org/Person"',
'itemtype="https://schema.org/Article"',
'itemtype="https://schema.org/Person"',
'itemprop="identifier"',
'itemprop="headline"',
'itemprop="dateCreated datePublished"',
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 test_component_can_be_rendered()
{
$view = $this->renderTestView(MarkdownPost::make());
$this->assertStringContainsString('http://schema.org/Article', $view);
$this->assertStringContainsString('https://schema.org/Article', $view);
}

public function test_component_renders_post_data()
Expand Down
4 changes: 2 additions & 2 deletions packages/framework/tests/Unit/Views/FeaturedImageViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function test_image_author_attribution_string()
{
$string = $this->renderComponent(['image.author' => 'John Doe']);
$this->assertStringContainsString('itemprop="creator"', $string);
$this->assertStringContainsString('itemtype="http://schema.org/Person"', $string);
$this->assertStringContainsString('itemtype="https://schema.org/Person"', $string);
$this->assertStringContainsString('<span itemprop="name">John Doe</span>', $string);
}

Expand All @@ -62,7 +62,7 @@ public function test_image_author_attribution_string_with_url()
]);
$this->assertStringContainsString('itemprop="creator"', $string);
$this->assertStringContainsString('itemprop="url"', $string);
$this->assertStringContainsString('itemtype="http://schema.org/Person"', $string);
$this->assertStringContainsString('itemtype="https://schema.org/Person"', $string);
$this->assertStringContainsString('<span itemprop="name">John Doe</span>', $string);
$this->assertStringContainsString('<a href="https://example.com/"', $string);
}
Expand Down

0 comments on commit 6f2ffa4

Please sign in to comment.