Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Cascade.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ protected function jsonLd()
$jsonLdOrganizationLogo = $this->data->get('json_ld_organization_logo');
$jsonLdPersonName = (string) $this->data->get('json_ld_person_name');

if ($jsonLdEntity === 'Organization' && $jsonLdOrganizationName) {
if ($jsonLdEntity === 'organization' && $jsonLdOrganizationName) {
if ($jsonLdOrganizationLogo && ! $jsonLdOrganizationLogo instanceof Value) {
$jsonLdOrganizationLogo = Asset::find($jsonLdOrganizationLogo);
}
Expand All @@ -602,7 +602,7 @@ protected function jsonLd()
]), JSON_UNESCAPED_SLASHES));
}

if ($jsonLdEntity === 'Person' && $jsonLdPersonName) {
if ($jsonLdEntity === 'person' && $jsonLdPersonName) {
$snippets->push(json_encode([
'@context' => 'https://schema.org',
'@type' => 'Person',
Expand Down
4 changes: 2 additions & 2 deletions tests/CascadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function it_generates_json_ld_data()
$siteDefaults = SiteDefaults::in('default')->set([
'site_name' => 'Cool Writings',
'description' => 'Bob sled team',
'json_ld_entity' => 'Person',
'json_ld_entity' => 'person',
'json_ld_person_name' => 'Derice Bannock',
]);

Expand All @@ -403,7 +403,7 @@ public function it_generates_json_ld_breadcrumbs()
$siteDefaults = SiteDefaults::in('default')->set([
'site_name' => 'Cool Writings',
'description' => 'Bob sled team',
'json_ld_entity' => 'Person',
'json_ld_entity' => 'person',
'json_ld_person_name' => 'Derice Bannock',
'json_ld_breadcrumbs' => true,
]);
Expand Down