Adds the shoot-type pages content and SEO foundation
Five pages under /soorten-fotoshoots/<id> with draft copy awaiting Andrea's approval (DRAFT markers), structured data (Service, BreadcrumbList, FAQPage), sitemap and Lighthouse entries. The overview route moves to soorten-fotoshoots/index.tsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import packages from '../../content/packages';
|
||||
import portfolioContent from '../../content/portfolioContent';
|
||||
import shootPageShared from '../../content/shootPageShared';
|
||||
import shootTypes from '../../content/shootTypes';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootTypesWithPhotos } from '../../lib/portfolioFilters';
|
||||
import type { ShootPageSources } from '../../lib/shootPageView';
|
||||
import { isPortfolioLive } from '../../lib/shootLinks';
|
||||
import sitePages from '../../sitePages';
|
||||
|
||||
// What every shoot page is built from besides its own content. The file
|
||||
// name starts with '-' so the router does not take it for a route.
|
||||
export const shootPageSources: ShootPageSources = {
|
||||
shootTypes,
|
||||
packages,
|
||||
shared: shootPageShared,
|
||||
site: siteContent,
|
||||
// Same as on the overview: only shoots with photos in a live portfolio
|
||||
portfolioShoots: isPortfolioLive(sitePages)
|
||||
? shootTypesWithPhotos(shootTypes, portfolioContent.photos).map(
|
||||
(type) => type.id,
|
||||
)
|
||||
: [],
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import NotFound from '../../components/StatusPage/NotFound';
|
||||
import ShootPage from '../../components/shoots/ShootPage/ShootPage';
|
||||
import StructuredData from '../../components/StructuredData/StructuredData';
|
||||
import gezinPage from '../../content/shootPages/gezin';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootPageView } from '../../lib/shootPageView';
|
||||
import { pageHead, shootPageGraph } from '../../seo';
|
||||
import { shootPageSources } from './-shootPageSources';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots/gezin')({
|
||||
head: () => pageHead('/soorten-fotoshoots/gezin'),
|
||||
component: GezinPage,
|
||||
});
|
||||
|
||||
// The gezin page. The structured data lives here, not in head(): head() is
|
||||
// part of the main bundle, the component is split off, so the page texts
|
||||
// only load with this page.
|
||||
function GezinPage() {
|
||||
const view = shootPageView('gezin', gezinPage, shootPageSources);
|
||||
if (view === undefined) return <NotFound />;
|
||||
return (
|
||||
<>
|
||||
{shootPageGraph(view, siteContent).map((data) => (
|
||||
<StructuredData key={data['@type']} data={data} />
|
||||
))}
|
||||
<ShootPage view={view} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import CallToAction from '../../components/CallToAction/CallToAction';
|
||||
import LinkButton from '../../components/LinkButton';
|
||||
import PageIntro from '../../components/PageIntro/PageIntro';
|
||||
import RichParagraph from '../../components/RichParagraph/RichParagraph';
|
||||
import ShootList from '../../components/shoots/ShootList/ShootList';
|
||||
import StructuredData from '../../components/StructuredData/StructuredData';
|
||||
import packages from '../../content/packages';
|
||||
import portfolioContent from '../../content/portfolioContent';
|
||||
import shootTypes from '../../content/shootTypes';
|
||||
import shootTypesPageContent from '../../content/shootTypesPageContent';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootTypesWithPhotos } from '../../lib/portfolioFilters';
|
||||
import { isPortfolioLive } from '../../lib/shootLinks';
|
||||
import { pageHead, shootServices, webPage } from '../../seo';
|
||||
import sitePages from '../../sitePages';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots/')({
|
||||
head: () => pageHead('/soorten-fotoshoots'),
|
||||
component: PhotoshootTypes,
|
||||
});
|
||||
|
||||
// The shoot types page: the page head, the shoots one by one and a closing
|
||||
// call to action, in the order of LAYOUT.md
|
||||
function PhotoshootTypes() {
|
||||
const { head, closing } = shootTypesPageContent;
|
||||
return (
|
||||
<>
|
||||
{/* The structured data lives here, not in head(): head() is part
|
||||
of the main bundle, the component is split off, so the shoot
|
||||
texts only load with this page. Google reads JSON-LD anywhere
|
||||
in the page; StructuredData escapes <, > and &. */}
|
||||
<StructuredData
|
||||
data={webPage('WebPage', '/soorten-fotoshoots', {
|
||||
mainEntity: shootServices(shootTypes, siteContent),
|
||||
})}
|
||||
/>
|
||||
<PageIntro eyebrow={head.eyebrow} title={head.title}>
|
||||
{head.intro}
|
||||
</PageIntro>
|
||||
<ShootList
|
||||
shoots={shootTypes}
|
||||
packages={packages}
|
||||
portfolioShoots={
|
||||
isPortfolioLive(sitePages)
|
||||
? shootTypesWithPhotos(
|
||||
shootTypes,
|
||||
portfolioContent.photos,
|
||||
).map((type) => type.id)
|
||||
: []
|
||||
}
|
||||
/>
|
||||
<CallToAction
|
||||
title={closing.title}
|
||||
titleId="shoot-types-cta-title"
|
||||
lead={<RichParagraph paragraph={closing.lead} />}
|
||||
data-testid="shoot-types-cta"
|
||||
>
|
||||
<LinkButton
|
||||
variant="accent"
|
||||
to={closing.booking.to}
|
||||
hash={closing.booking.hash}
|
||||
data-testid="shoot-types-booking-link"
|
||||
>
|
||||
{closing.booking.label}
|
||||
</LinkButton>
|
||||
</CallToAction>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import NotFound from '../../components/StatusPage/NotFound';
|
||||
import ShootPage from '../../components/shoots/ShootPage/ShootPage';
|
||||
import StructuredData from '../../components/StructuredData/StructuredData';
|
||||
import loveshootPage from '../../content/shootPages/loveshoot';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootPageView } from '../../lib/shootPageView';
|
||||
import { pageHead, shootPageGraph } from '../../seo';
|
||||
import { shootPageSources } from './-shootPageSources';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots/loveshoot')({
|
||||
head: () => pageHead('/soorten-fotoshoots/loveshoot'),
|
||||
component: LoveshootPage,
|
||||
});
|
||||
|
||||
// The loveshoot page. The structured data lives here, not in head(): head() is
|
||||
// part of the main bundle, the component is split off, so the page texts
|
||||
// only load with this page.
|
||||
function LoveshootPage() {
|
||||
const view = shootPageView('loveshoot', loveshootPage, shootPageSources);
|
||||
if (view === undefined) return <NotFound />;
|
||||
return (
|
||||
<>
|
||||
{shootPageGraph(view, siteContent).map((data) => (
|
||||
<StructuredData key={data['@type']} data={data} />
|
||||
))}
|
||||
<ShootPage view={view} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import NotFound from '../../components/StatusPage/NotFound';
|
||||
import ShootPage from '../../components/shoots/ShootPage/ShootPage';
|
||||
import StructuredData from '../../components/StructuredData/StructuredData';
|
||||
import newbornPage from '../../content/shootPages/newborn';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootPageView } from '../../lib/shootPageView';
|
||||
import { pageHead, shootPageGraph } from '../../seo';
|
||||
import { shootPageSources } from './-shootPageSources';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots/newborn')({
|
||||
head: () => pageHead('/soorten-fotoshoots/newborn'),
|
||||
component: NewbornPage,
|
||||
});
|
||||
|
||||
// The newborn page. The structured data lives here, not in head(): head() is
|
||||
// part of the main bundle, the component is split off, so the page texts
|
||||
// only load with this page.
|
||||
function NewbornPage() {
|
||||
const view = shootPageView('newborn', newbornPage, shootPageSources);
|
||||
if (view === undefined) return <NotFound />;
|
||||
return (
|
||||
<>
|
||||
{shootPageGraph(view, siteContent).map((data) => (
|
||||
<StructuredData key={data['@type']} data={data} />
|
||||
))}
|
||||
<ShootPage view={view} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import NotFound from '../../components/StatusPage/NotFound';
|
||||
import ShootPage from '../../components/shoots/ShootPage/ShootPage';
|
||||
import StructuredData from '../../components/StructuredData/StructuredData';
|
||||
import portretPage from '../../content/shootPages/portret';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootPageView } from '../../lib/shootPageView';
|
||||
import { pageHead, shootPageGraph } from '../../seo';
|
||||
import { shootPageSources } from './-shootPageSources';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots/portret')({
|
||||
head: () => pageHead('/soorten-fotoshoots/portret'),
|
||||
component: PortretPage,
|
||||
});
|
||||
|
||||
// The portret page. The structured data lives here, not in head(): head() is
|
||||
// part of the main bundle, the component is split off, so the page texts
|
||||
// only load with this page.
|
||||
function PortretPage() {
|
||||
const view = shootPageView('portret', portretPage, shootPageSources);
|
||||
if (view === undefined) return <NotFound />;
|
||||
return (
|
||||
<>
|
||||
{shootPageGraph(view, siteContent).map((data) => (
|
||||
<StructuredData key={data['@type']} data={data} />
|
||||
))}
|
||||
<ShootPage view={view} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import NotFound from '../../components/StatusPage/NotFound';
|
||||
import ShootPage from '../../components/shoots/ShootPage/ShootPage';
|
||||
import StructuredData from '../../components/StructuredData/StructuredData';
|
||||
import zwangerschapPage from '../../content/shootPages/zwangerschap';
|
||||
import siteContent from '../../content/siteContent';
|
||||
import { shootPageView } from '../../lib/shootPageView';
|
||||
import { pageHead, shootPageGraph } from '../../seo';
|
||||
import { shootPageSources } from './-shootPageSources';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots/zwangerschap')({
|
||||
head: () => pageHead('/soorten-fotoshoots/zwangerschap'),
|
||||
component: ZwangerschapPage,
|
||||
});
|
||||
|
||||
// The zwangerschap page. The structured data lives here, not in head(): head() is
|
||||
// part of the main bundle, the component is split off, so the page texts
|
||||
// only load with this page.
|
||||
function ZwangerschapPage() {
|
||||
const view = shootPageView(
|
||||
'zwangerschap',
|
||||
zwangerschapPage,
|
||||
shootPageSources,
|
||||
);
|
||||
if (view === undefined) return <NotFound />;
|
||||
return (
|
||||
<>
|
||||
{shootPageGraph(view, siteContent).map((data) => (
|
||||
<StructuredData key={data['@type']} data={data} />
|
||||
))}
|
||||
<ShootPage view={view} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user