Repository navigation
chore(demos): bring the Playground and blog demo up to date with the blog template - #3974
khoinguyenpham04 wants to merge 1 commit into
Conversation
…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.
|
🚀 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 deploymentPreview Deployments by commit
|
There was a problem hiding this comment.
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 indemos/playground/srcis byte-identical to the corresponding file intemplates/blog/src, and every file ininfra/blog-demo/srcis byte-identical totemplates/blog-cloudflare/src, except for the intentionally preservedworker.tsfiles (which do not appear in the diff). - Worker preservation: neither
demos/playground/src/worker.tsnorinfra/blog-demo/src/worker.tsis modified. - Locale correctness: the templates use
getEmDashCollection/getEmDashEntry/getTaxonomyTermsWithCacheHint/searchfromemdash; 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 arequestCached("siteSettings", …)key and a single-flight isolate cache, so the separate call inBase.astroplus the calls on post detail do not multiply round-trips. The overall query pattern is identical to the already-reviewed templates. - Routing/IDs:
post.idfromgetEmDashCollectionis 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/playgroundandinfra/blog-demoare markedprivate: 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.
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/blogandtemplates/blog-cloudflare.demos/playground/srcnow matchestemplates/blog/src, keeping the Playground'sworker.ts.infra/blog-demo/srcnow matchestemplates/blog-cloudflare/src, keeping the demo'sworker.ts.astro.config.mjsfiles now load Inter as--font-body, the variable the new theme reads. With the old--font-sansname, 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
Checklist
pnpm typecheckpasses (astro checkfor both demos: 0 errors, 0 warnings)pnpm lintpassespnpm testpasses (or targeted tests for my change):pnpm test:e2e:playgroundpnpm formathas been runAI-generated code disclosure
Screenshots / test output