Skip to content

chore(demos): bring the Playground and blog demo up to date with the blog template - #3974

Open
khoinguyenpham04 wants to merge 1 commit into
mainfrom
noah/sync-blog-demos-template
Open

khoinguyenpham04 wants to merge 1 commit into
mainfrom
noah/sync-blog-demos-template

Conversation

@khoinguyenpham04

Copy link
Copy Markdown
Collaborator

What does this PR do?

The Playground (try.emdashcms.com) and the blog demo (blog-demo.emdashcms.com) were still running the old copy of the blog frontend. The redesign in #3951 and the locale fix in #3966 changed only templates/blog and templates/blog-cloudflare.

  • demos/playground/src now matches templates/blog/src, keeping the Playground's worker.ts.
  • infra/blog-demo/src now matches templates/blog-cloudflare/src, keeping the demo's worker.ts.
  • Both astro.config.mjs files now load Inter as --font-body, the variable the new theme reads. With the old --font-sans name, the pages would fall back to a system font.

The new template already marks titles, excerpts and featured images as editable, so the Playground's click-to-edit still covers every page.

Seeds are unchanged. The Playground seed points to media bundled with the demo, so copying the template seed would break its images.

The sites change only after both workers are deployed.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes (astro check for both demos: 0 errors, 0 warnings)
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change): pnpm test:e2e:playground
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable): n/a, this copies template files that are already tested
  • User-visible strings in the admin UI are wrapped for translation (if applicable): n/a, no admin changes
  • I have added and reviewed the user-facing changeset (if this PR changes a published package): n/a, both demos are private and unpublished
  • New features link to an approved Discussion: n/a
  • I have included screenshots below if this PR changes the UI

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 5.5

Screenshots / test output

The Playground home page in the new blog design: a "My Blog" header with Home, About and Posts links, the "Thoughts on building for the web" hero, and a featured post card, with the Playground bar along the bottom

demos/playground build: Complete
infra/blog-demo build: Complete
e2e/playground/media-ready.spec.ts › opens with seeded media and ready usage: 1 passed

…blog template

Both sites still ran the pre-redesign copy of the blog frontend. Copy
templates/blog/src into demos/playground and templates/blog-cloudflare/src
into infra/blog-demo, keeping each worker.ts, and load Inter under
--font-body, the variable the new theme reads.
@changeset-bot

changeset-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cb340ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet size/XL cla: signed labels Oct 7, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://noah-sync-blog-demos-template.try.emdashcms.com, https://noah-sync-blog-demos-template-emdash-playground.emdash-cms.workers.dev (commit cb340ba)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b623b433.try.emdashcms.com, https://b623b433-emdash-playground.emdash-cms.workers.dev cb340ba 2026-10-07T19:38:09.396Z Visit the dashboard ↗

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is the right change, done the right way: a mechanical sync that makes the private Playground and blog demo match the updated templates/blog and templates/blog-cloudflare, while explicitly keeping the demo-specific worker.ts files and seeds untouched. The --font-sans → --font-body rename in both astro.config.mjs files is consistent with the design tokens in src/styles/tokens.css, so the loaded Inter webfont is actually used by the new theme.

I checked:

  • Mirror fidelity: every src/* file in demos/playground/src is byte-identical to the corresponding file in templates/blog/src, and every file in infra/blog-demo/src is byte-identical to templates/blog-cloudflare/src, except for the intentionally preserved worker.ts files (which do not appear in the diff).
  • Worker preservation: neither demos/playground/src/worker.ts nor infra/blog-demo/src/worker.ts is modified.
  • Locale correctness: the templates use getEmDashCollection / getEmDashEntry / getTaxonomyTermsWithCacheHint / search from emdash; those helpers resolve locale internally, so the content-table queries are locale-filtered without each page needing to thread a locale around. The requirement to filter content-table queries by locale is satisfied at the helper layer.
  • Query-count sanity: getSiteSettings() / getSiteSettingsWithCacheHint() share a requestCached("siteSettings", …) key and a single-flight isolate cache, so the separate call in Base.astro plus the calls on post detail do not multiply round-trips. The overall query pattern is identical to the already-reviewed templates.
  • Routing/IDs: post.id from getEmDashCollection is the loader’s Astro entry ID, which is the content slug (prefixed with locale when i18n routing prefixes it), so links like /posts/${post.id} and /tag/${tag.slug} route correctly.
  • Changesets: demos/playground and infra/blog-demo are marked private: true; no published package changed, so omitting a changeset is correct.

No logic bugs, regressions, security issues, or AGENTS.md convention violations are present in the changed code. The PR is clean.

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed review/approved Approved; no new commits since size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant