Skip to content

refactor(data): centralize site content - #19

Merged
georg-schwarz merged 3 commits into
mainfrom
separate-content-from-page
Mar 4, 2026
Merged

refactor(data): centralize site content#19
georg-schwarz merged 3 commits into
mainfrom
separate-content-from-page

Conversation

@georg-schwarz

@georg-schwarz georg-schwarz commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move data types into src/data-models to separate from actual data
  • Move brand config into src/data so we have most configuration in the data folder
  • Centralize page copy in data modules

Keep brand types in data-models and localize page title formatting to the layout with updated docs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Astro site to centralize site copy/config under src/data/ and move shared type definitions into src/data-models/, updating pages/components/docs to consume these new modules.

Changes:

  • Moved brand config imports from @/config/brand to @/data/brand across layouts/pages.
  • Centralized page-level strings/labels into new src/data/* modules (home/about/blog/resources).
  • Introduced src/data-models/* for shared TypeScript types and updated consumers accordingly.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/pages/rss.xml.ts Updates brand config import to new src/data/brand location.
src/pages/resources/index.astro Replaces inline copy with RESOURCES_PAGE_CONTENT.
src/pages/resources/[...slug].astro Uses centralized resource labels (updated/canonical/related).
src/pages/index.astro Uses HOME_PAGE_CONTENT for hero/section/CTA copy.
src/pages/blog/index.astro Uses BLOG_PAGE_CONTENT for title/empty state.
src/pages/about.astro Uses ABOUT_PAGE_CONTENT and AboutSection model for section rendering.
src/layouts/BaseLayout.astro Updates brand config import path.
src/data/resources.ts Adds centralized resources page copy object.
src/data/home.ts Moves Feature type to data-models and adds HOME_PAGE_CONTENT.
src/data/brand.ts Updates SocialPlatform type import to data-models.
src/data/blog.ts Adds centralized blog page copy object.
src/data/about.ts Moves types to data-models and adds ABOUT_PAGE_CONTENT.
src/data-models/social.ts Introduces SocialPlatform union type.
src/data-models/resources.ts Introduces ResourcesPageContent interface.
src/data-models/home.ts Introduces Feature and HomePageContent interfaces.
src/data-models/blog.ts Introduces BlogPageContent interface.
src/data-models/about.ts Introduces About page content + team member models.
src/components/features/Team.astro Switches to shared TeamMember model import.
src/components/features/SocialLinks.astro Switches to shared SocialPlatform model import.
README.md Updates branding path + documents new site content pattern.
AGENTS.md Updates branding path + documents new site content pattern.
Comments suppressed due to low confidence (1)

src/components/features/Team.astro:6

  • TEAM_MEMBERS is typed as a readonly TeamMember[] (via satisfies readonly TeamMember[] in src/data/about.ts), but this component's prop expects a mutable TeamMember[]. In strict TS this makes <Team members={TEAM_MEMBERS} /> fail type-checking. Consider changing the prop to members: readonly TeamMember[] to accept both readonly and mutable arrays (matching the pattern used by SocialLinks).
export interface Props {
  members: TeamMember[];
  title?: string;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread src/data-models/about.ts Outdated
Make TeamMember.bio optional to match conditional rendering in Team component.
@georg-schwarz
georg-schwarz requested a review from Waldleufer March 3, 2026 17:09

@Waldleufer Waldleufer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the separation of concerns 👍

@georg-schwarz
georg-schwarz merged commit c2e655c into main Mar 4, 2026
2 checks passed
@georg-schwarz
georg-schwarz deleted the separate-content-from-page branch March 4, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants