A paragraph with links is stored as text pieces and typed route links, so the API can deliver it without HTML. On the about page, Andrea becomes a Person with her specialisations, linked both ways to the business that every page already describes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.0 KiB
Domain Entities — Unit 2: Over mij page
Decisions: over-mij-page-fd-questions.md — Q1 A (segments), Q2 A (route + hash), Q3 B (basis + knowsAbout), Q4 B (two-way link).
Entity Relationships
graph TD
Page["AboutPageContent"] -->|"head"| Head["PageHead: eyebrow, title"]
Page -->|"intro"| Intro["Intro: eyebrow, title, paragraphs, image"]
Intro -->|"paragraphs: RichText[]"| Rich["RichText = (string or InlineLink)[]"]
Rich -->|"contains"| Inline["InlineLink = LinkTarget + text"]
Inline -->|"is a"| Target["LinkTarget: to RoutePath, hash?"]
Page -->|"background, personal"| Story["Story: title, paragraphs string[]"]
Page -->|"photos"| Img["ContentImage x2"]
Intro -->|"image"| Img
Page -->|"booking"| Booking["Booking: label + LinkTarget"]
Booking -->|"is a"| Target
Page -->|"person"| PersonC["PersonContent: name, jobTitle, knowsAbout[]"]
PersonC -->|"becomes"| PersonLd["Person JSON-LD"]
PersonLd -->|"worksFor @id"| Business["ProfessionalService JSON-LD"]
Business -->|"founder @id"| PersonLd
AboutLd["AboutPage JSON-LD"] -->|"mainEntity"| PersonLd
classDef content fill:#2196F3,stroke:#0d47a1,color:#000;
classDef shared fill:#4CAF50,stroke:#2e7d32,color:#000;
classDef ld fill:#FF9800,stroke:#e65100,color:#000;
class Page,Head,Intro,Rich,Inline,Story,Booking,PersonC content;
class Target,Img shared;
class PersonLd,Business,AboutLd ld;
Text alternative: the page content holds a head, an intro with rich-text paragraphs (text and inline links) and a photo, two story blocks, two photos, a booking link and person data; link targets are a route plus optional hash; the person data becomes a Person in the structured data, which works for the business, is its founder and is the main entity of the AboutPage.
Content Types (web/src/content/types.ts)
LinkTarget (new, shared)
| Field | Type | Notes |
|---|---|---|
to |
RoutePath |
an existing route; a typo is a type error (same as the menus) |
hash |
string? |
anchor without #, e.g. 'contact' |
InlineLink (new)
LinkTarget & { text: string } — e.g. { text: 'neem contact op', to: '/', hash: 'contact' }
RichText (new)
(string | InlineLink)[] — one paragraph as a list of plain text pieces and links, in reading order. Spaces belong to the text pieces.
AboutPageContent (new)
| Field | Type | Content (from the live site, FR-OM-01..05) |
|---|---|---|
head |
{ eyebrow: string; title: string } |
"Andrea Slop Fotografie", "Over mij" |
intro |
{ eyebrow: string; title: string; paragraphs: RichText[]; image: ContentImage } |
"Lifestyle fotograaf", "Hoi! Ik ben Andrea", 3 paragraphs (third with two links), portrait |
background |
{ title: string; paragraphs: string[] } |
"Hoe het begon", 1 paragraph |
photos |
[ContentImage, ContentImage] |
the two duo photos |
personal |
{ title: string; paragraphs: string[] } |
"Buiten de camera om", 2 paragraphs |
booking |
LinkTarget & { label: string } |
"Boek je shoot" → / + contact |
person |
{ name: string; jobTitle: string; knowsAbout: string[] } |
"Andrea Slop", "Lifestyle fotograaf", ["Newbornfotografie", "Zwangerschapsfotografie", "Gezinsfotografie"] |
person is content (not code) because the API/CMS will own it, like the texts it summarises.
ContentImage (existing, reused)
src, alt, width, height — intrinsic size of the resized file.
Structured Data (web/src/seo.ts)
Identifiers (new constants)
| Name | Value |
|---|---|
businessId |
https://andreaslop.nl/#business |
personId |
https://andreaslop.nl/over-mij#andrea |
ProfessionalService (existing, extended)
Adds '@id': businessId and founder: { '@id': personId }; everything else unchanged. Present on every page (root route).
Person (new, only on /over-mij)
| Field | Source |
|---|---|
@type |
Person |
@id |
personId |
name, jobTitle |
AboutPageContent.person |
knowsAbout |
AboutPageContent.person.knowsAbout (cleaned, BR-SD-05) |
image |
absolute URL of the page's ogImage (/og-over-mij.jpg) |
address |
PostalAddress, addressLocality: 'Huizen', addressCountry: 'NL' (same as the business) |
sameAs |
visibleSocials(siteContent.socials) hrefs; omitted when empty |
worksFor |
{ '@id': businessId } |
url |
canonical URL of /over-mij |
AboutPage (new, only on /over-mij)
| Field | Source |
|---|---|
@type |
AboutPage |
@id, url |
canonical URL of /over-mij |
name |
page title from sitePages ("Over mij – fotograaf in Huizen") |
description |
page description from sitePages |
inLanguage |
nl-NL |
mainEntity |
the Person above (embedded) |
Registry (web/src/sitePages.ts)
/over-mij: title "Over mij – fotograaf in Huizen", the approved description, indexed: true, ogImage: { path: '/og-over-mij.jpg', width: 1200, height: 630, alt: <describes the crop> }.