Compare commits

..
2 Commits
Author SHA1 Message Date
eric.bus e467436202 Merge pull request 'SEO: site-wide NewsMediaOrganization and WebSite structured data' (#41) from feature/seo-news-detail into main
Build and Deploy / build (push) In progress
Reviewed-on: #41
2026-11-23 15:59:40 +01:00
eric.busandClaude Opus 5.5 57f2a1ee45 SEO: site-wide NewsMediaOrganization and WebSite structured data
- GOOI&meer as NewsMediaOrganization on every page: former names (NH Gooi,
  6fm), logo, address, contact, KvK, social profiles, masthead (/redactie)
  and feedback policy (/klachten)
- WebSite with SearchAction (/nieuws/zoeken/{term})
- Organization details in config/seo.php; news articles use the same
  publisher @id and refer to the WebSite with isPartOf

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:56:46 +01:00
4 changed files with 123 additions and 6 deletions

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
<?php
/*
|--------------------------------------------------------------------------
| Organization details for structured data (schema.org)
|--------------------------------------------------------------------------
|
| Used for the NewsMediaOrganization / WebSite JSON-LD on every page and as
| the publisher of news articles. URLs are relative to the site (APP_URL /
| current host); add more profiles to 'same_as' when available.
|
*/
return [
'organization' => [
'name' => 'GOOI&meer',
// Former names, so search engines and AI tools link them to GOOI&meer
'alternate_names' => ['NH Gooi', '6fm'],
'logo' => '/android-chrome-512x512.png',
'logo_width' => 512,
'logo_height' => 512,
'address' => [
'street' => 'IJsselmeerstraat 3B',
'postal_code' => '1271 AA',
'locality' => 'Huizen',
'country' => 'NL',
],
'telephone' => '+31-35-6424774',
'email' => 'info@gooienmeer.nl',
'kvk' => '41194132',
'same_as' => [
'https://www.facebook.com/WijZijnGOOIenMeer',
'https://www.instagram.com/gooi.en.meer',
],
// Pages describing the newsroom and how to give feedback / complain
'masthead' => '/redactie',
'feedback_policy' => '/klachten',
],
];
+1
View File
@@ -38,6 +38,7 @@
->metaTags(); ->metaTags();
} ?> } ?>
<meta name="twitter:card" content="{{ (isset($metadata) && $metadata->get('image')) ? 'summary_large_image' : 'summary' }}" /> <meta name="twitter:card" content="{{ (isset($metadata) && $metadata->get('image')) ? 'summary_large_image' : 'summary' }}" />
@include('partial/site_jsonld')
@stack('head') @stack('head')
@stack('styles') @stack('styles')
<link rel="icon" href="/favicon.ico" sizes="48x48"> <link rel="icon" href="/favicon.ico" sizes="48x48">
+11 -6
View File
@@ -21,16 +21,20 @@
} }
} }
// Same organization as in partial/site_jsonld (config/seo.php); name and
// logo are repeated here because Google expects them on the publisher
$org = config('seo.organization');
$home = rtrim(url('/'), '/') . '/';
$publisher = [ $publisher = [
'@type' => 'NewsMediaOrganization', '@type' => 'NewsMediaOrganization',
'@id' => rtrim(url('/'), '/') . '/#organization', '@id' => $home . '#organization',
'name' => 'GOOI&meer', 'name' => $org['name'],
'url' => url('/'), 'url' => $home,
'logo' => [ 'logo' => [
'@type' => 'ImageObject', '@type' => 'ImageObject',
'url' => url('/android-chrome-512x512.png'), 'url' => url($org['logo']),
'width' => 512, 'width' => $org['logo_width'],
'height' => 512, 'height' => $org['logo_height'],
], ],
]; ];
@@ -38,6 +42,7 @@
'@type' => 'NewsArticle', '@type' => 'NewsArticle',
'@id' => $canonical . '#article', '@id' => $canonical . '#article',
'mainEntityOfPage' => ['@type' => 'WebPage', '@id' => $canonical], 'mainEntityOfPage' => ['@type' => 'WebPage', '@id' => $canonical],
'isPartOf' => ['@id' => $home . '#website'],
'url' => $canonical, 'url' => $canonical,
'headline' => mb_substr($news->plainTitle(), 0, 110), 'headline' => mb_substr($news->plainTitle(), 0, 110),
'description' => $news->summary(200), 'description' => $news->summary(200),
@@ -0,0 +1,69 @@
{{--
Site-wide structured data (schema.org JSON-LD): GOOI&meer as a
NewsMediaOrganization and the WebSite with its search. Included on every
page; news articles refer to the organization by its @id.
Values: config/seo.php
--}}
@php
$org = config('seo.organization');
$home = rtrim(url('/'), '/') . '/';
$organization = [
'@type' => 'NewsMediaOrganization',
'@id' => $home . '#organization',
'name' => $org['name'],
'alternateName' => $org['alternate_names'],
'url' => $home,
'logo' => [
'@type' => 'ImageObject',
'url' => url($org['logo']),
'width' => $org['logo_width'],
'height' => $org['logo_height'],
],
'address' => [
'@type' => 'PostalAddress',
'streetAddress' => $org['address']['street'],
'postalCode' => $org['address']['postal_code'],
'addressLocality' => $org['address']['locality'],
'addressCountry' => $org['address']['country'],
],
'telephone' => $org['telephone'],
'email' => $org['email'],
'contactPoint' => [
'@type' => 'ContactPoint',
'contactType' => 'redactie',
'telephone' => $org['telephone'],
'email' => $org['email'],
'availableLanguage' => 'nl',
],
'identifier' => [
'@type' => 'PropertyValue',
'propertyID' => 'KvK',
'value' => $org['kvk'],
],
'sameAs' => $org['same_as'],
'masthead' => url($org['masthead']),
'actionableFeedbackPolicy' => url($org['feedback_policy']),
];
$website = [
'@type' => 'WebSite',
'@id' => $home . '#website',
'url' => $home,
'name' => $org['name'],
'alternateName' => $org['alternate_names'],
'inLanguage' => 'nl-NL',
'publisher' => ['@id' => $home . '#organization'],
'potentialAction' => [
'@type' => 'SearchAction',
'target' => [
'@type' => 'EntryPoint',
'urlTemplate' => url('/nieuws/zoeken') . '/{search_term_string}',
],
'query-input' => 'required name=search_term_string',
],
];
$jsonld = ['@context' => 'https://schema.org', '@graph' => [$organization, $website]];
@endphp
<script type="application/ld+json">{!! json_encode($jsonld, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_PRETTY_PRINT) !!}</script>