diff --git a/.changeset/comments-ui-subpath.md b/.changeset/comments-ui-subpath.md
new file mode 100644
index 0000000000..d3eaa0446f
--- /dev/null
+++ b/.changeset/comments-ui-subpath.md
@@ -0,0 +1,5 @@
+---
+"emdash": minor
+---
+
+Adds `emdash/ui/comments` for `Comments` and `CommentForm` so their CSS only loads on pages that import them. Importing from `emdash/ui` still works but is deprecated and will be removed in 1.0 — prefer `import { Comments, CommentForm } from "emdash/ui/comments"`.
diff --git a/demos/cloudflare/src/pages/posts/[slug].astro b/demos/cloudflare/src/pages/posts/[slug].astro
index 23a5178d71..c19aebee52 100644
--- a/demos/cloudflare/src/pages/posts/[slug].astro
+++ b/demos/cloudflare/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/demos/playground/src/pages/posts/[slug].astro b/demos/playground/src/pages/posts/[slug].astro
index 23a5178d71..c19aebee52 100644
--- a/demos/playground/src/pages/posts/[slug].astro
+++ b/demos/playground/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/demos/postgres/src/pages/posts/[slug].astro b/demos/postgres/src/pages/posts/[slug].astro
index 23a5178d71..c19aebee52 100644
--- a/demos/postgres/src/pages/posts/[slug].astro
+++ b/demos/postgres/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/demos/preview/src/pages/posts/[slug].astro b/demos/preview/src/pages/posts/[slug].astro
index 23a5178d71..c19aebee52 100644
--- a/demos/preview/src/pages/posts/[slug].astro
+++ b/demos/preview/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/demos/simple/src/pages/posts/[slug].astro b/demos/simple/src/pages/posts/[slug].astro
index 23a5178d71..c19aebee52 100644
--- a/demos/simple/src/pages/posts/[slug].astro
+++ b/demos/simple/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/e2e/fixture-cloudflare/src/pages/posts/[slug].astro b/e2e/fixture-cloudflare/src/pages/posts/[slug].astro
index 92cf814c11..2f7414411f 100644
--- a/e2e/fixture-cloudflare/src/pages/posts/[slug].astro
+++ b/e2e/fixture-cloudflare/src/pages/posts/[slug].astro
@@ -1,6 +1,7 @@
---
import { getEmDashEntry } from "emdash";
-import { PortableText, Comments, CommentForm } from "emdash/ui";
+import { PortableText } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
const { slug } = Astro.params;
if (!slug) return Astro.redirect("/404");
diff --git a/e2e/fixture/src/pages/posts/[slug].astro b/e2e/fixture/src/pages/posts/[slug].astro
index 92cf814c11..2f7414411f 100644
--- a/e2e/fixture/src/pages/posts/[slug].astro
+++ b/e2e/fixture/src/pages/posts/[slug].astro
@@ -1,6 +1,7 @@
---
import { getEmDashEntry } from "emdash";
-import { PortableText, Comments, CommentForm } from "emdash/ui";
+import { PortableText } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
const { slug } = Astro.params;
if (!slug) return Astro.redirect("/404");
diff --git a/fixtures/perf-site/src/pages/posts/[slug].astro b/fixtures/perf-site/src/pages/posts/[slug].astro
index a8a77bc977..b748a06de0 100644
--- a/fixtures/perf-site/src/pages/posts/[slug].astro
+++ b/fixtures/perf-site/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/infra/blog-demo/src/pages/posts/[slug].astro b/infra/blog-demo/src/pages/posts/[slug].astro
index 1549fd51fd..0f6135d260 100644
--- a/infra/blog-demo/src/pages/posts/[slug].astro
+++ b/infra/blog-demo/src/pages/posts/[slug].astro
@@ -11,10 +11,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/infra/cache-demo/src/pages/posts/[slug].astro b/infra/cache-demo/src/pages/posts/[slug].astro
index 1549fd51fd..0f6135d260 100644
--- a/infra/cache-demo/src/pages/posts/[slug].astro
+++ b/infra/cache-demo/src/pages/posts/[slug].astro
@@ -11,10 +11,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/infra/do-demo/src/pages/posts/[slug].astro b/infra/do-demo/src/pages/posts/[slug].astro
index 1549fd51fd..0f6135d260 100644
--- a/infra/do-demo/src/pages/posts/[slug].astro
+++ b/infra/do-demo/src/pages/posts/[slug].astro
@@ -11,10 +11,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/infra/do-solo-demo/src/pages/posts/[slug].astro b/infra/do-solo-demo/src/pages/posts/[slug].astro
index 1549fd51fd..0f6135d260 100644
--- a/infra/do-solo-demo/src/pages/posts/[slug].astro
+++ b/infra/do-solo-demo/src/pages/posts/[slug].astro
@@ -11,10 +11,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/packages/core/package.json b/packages/core/package.json
index 3af653739b..257d81b99d 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -42,6 +42,7 @@
"default": "./dist/astro/middleware/redirect.mjs"
},
"./ui": "./src/ui.ts",
+ "./ui/comments": "./src/ui-comments.ts",
"./ui/search": "./src/components/LiveSearch.astro",
"./cli": {
"types": "./dist/cli/index.d.mts",
diff --git a/packages/core/src/components/CommentForm.astro b/packages/core/src/components/CommentForm.astro
index 3549ee7e12..e39c3eb6e4 100644
--- a/packages/core/src/components/CommentForm.astro
+++ b/packages/core/src/components/CommentForm.astro
@@ -11,7 +11,7 @@
* @example
* ```astro
* ---
- * import { CommentForm } from "emdash/ui";
+ * import { CommentForm } from "emdash/ui/comments";
* ---
*
* ```
diff --git a/packages/core/src/components/Comments.astro b/packages/core/src/components/Comments.astro
index f752b8edb4..0a3425e124 100644
--- a/packages/core/src/components/Comments.astro
+++ b/packages/core/src/components/Comments.astro
@@ -8,7 +8,7 @@
* @example
* ```astro
* ---
- * import { Comments } from "emdash/ui";
+ * import { Comments } from "emdash/ui/comments";
* ---
*
* ```
diff --git a/packages/core/src/components/index.ts b/packages/core/src/components/index.ts
index dd765470b8..b98487f427 100644
--- a/packages/core/src/components/index.ts
+++ b/packages/core/src/components/index.ts
@@ -22,8 +22,15 @@
// Wrapper component with EmDash defaults
export { default as PortableText } from "./PortableText.astro";
-// Comment components
+/**
+ * @deprecated Import from `emdash/ui/comments` instead. Barrel re-exports pull
+ * comment CSS into every page that imports `emdash/ui` (#2039). Will be removed in 1.0.
+ */
export { default as Comments } from "./Comments.astro";
+/**
+ * @deprecated Import from `emdash/ui/comments` instead. Barrel re-exports pull
+ * comment CSS into every page that imports `emdash/ui` (#2039). Will be removed in 1.0.
+ */
export { default as CommentForm } from "./CommentForm.astro";
// Widget components
diff --git a/packages/core/src/ui-comments.ts b/packages/core/src/ui-comments.ts
new file mode 100644
index 0000000000..430987fe2b
--- /dev/null
+++ b/packages/core/src/ui-comments.ts
@@ -0,0 +1,19 @@
+/**
+ * EmDash comment components
+ *
+ * Kept out of the main `emdash/ui` barrel so their styles are only loaded on
+ * pages that actually render comments. Importing from `emdash/ui` pulls the
+ * whole barrel into Astro's CSS module graph, which put comment CSS on every
+ * page that used e.g. `PortableText` (#2039).
+ *
+ * ```astro
+ * ---
+ * import { Comments, CommentForm } from "emdash/ui/comments";
+ * ---
+ *
+ *
+ * ```
+ */
+
+export { default as Comments } from "./components/Comments.astro";
+export { default as CommentForm } from "./components/CommentForm.astro";
diff --git a/packages/core/src/ui.ts b/packages/core/src/ui.ts
index 045215eb5a..7ae2d8328f 100644
--- a/packages/core/src/ui.ts
+++ b/packages/core/src/ui.ts
@@ -52,9 +52,6 @@ export {
// Shares the name with the `type Block` re-export above; the
// type and the component live in different namespaces.
Block,
- // Comment components
- Comments,
- CommentForm,
// Widget components
WidgetArea,
// Components object for manual use
@@ -78,3 +75,14 @@ export {
EmDashBodyStart,
EmDashBodyEnd,
} from "./components/index.js";
+
+/**
+ * @deprecated Import from `emdash/ui/comments` instead. Barrel re-exports pull
+ * comment CSS into every page that imports `emdash/ui` (#2039). Will be removed in 1.0.
+ */
+export { Comments } from "./components/index.js";
+/**
+ * @deprecated Import from `emdash/ui/comments` instead. Barrel re-exports pull
+ * comment CSS into every page that imports `emdash/ui` (#2039). Will be removed in 1.0.
+ */
+export { CommentForm } from "./components/index.js";
diff --git a/packages/core/tests/integration/fixture/src/pages/posts/[slug].astro b/packages/core/tests/integration/fixture/src/pages/posts/[slug].astro
index 92cf814c11..2f7414411f 100644
--- a/packages/core/tests/integration/fixture/src/pages/posts/[slug].astro
+++ b/packages/core/tests/integration/fixture/src/pages/posts/[slug].astro
@@ -1,6 +1,7 @@
---
import { getEmDashEntry } from "emdash";
-import { PortableText, Comments, CommentForm } from "emdash/ui";
+import { PortableText } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
const { slug } = Astro.params;
if (!slug) return Astro.redirect("/404");
diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json
index 2f23235f14..be9296d8da 100644
--- a/packages/core/tsconfig.json
+++ b/packages/core/tsconfig.json
@@ -17,6 +17,7 @@
"src/components/**",
"src/preview/**",
"src/ui.ts",
+ "src/ui-comments.ts",
"src/auth/providers/*-admin.tsx"
]
}
diff --git a/scripts/typecheck-public-source.mjs b/scripts/typecheck-public-source.mjs
index eb095b9581..41d0bf4c05 100644
--- a/scripts/typecheck-public-source.mjs
+++ b/scripts/typecheck-public-source.mjs
@@ -38,6 +38,7 @@ const pkgPath = resolve(repoRoot, "packages/core/package.json");
*/
const RUNTIME_COUPLED = new Set([
"./ui", // src/ui.ts -- re-exports Astro / components
+ "./ui/comments", // src/ui-comments.ts -- re-exports Astro /
"./auth/providers/github-admin", // .tsx -- admin React + @cloudflare/kumo
"./auth/providers/google-admin", // .tsx -- admin React + @cloudflare/kumo
]);
diff --git a/skills/building-emdash-site/SKILL.md b/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/skills/building-emdash-site/SKILL.md
+++ b/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/skills/building-emdash-site/references/site-features.md b/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/skills/building-emdash-site/references/site-features.md
+++ b/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/blank/.agents/skills/building-emdash-site/SKILL.md b/templates/blank/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/blank/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/blank/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/blank/.agents/skills/building-emdash-site/references/site-features.md b/templates/blank/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/blank/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/blank/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/blog-cloudflare/.agents/skills/building-emdash-site/SKILL.md b/templates/blog-cloudflare/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/blog-cloudflare/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/blog-cloudflare/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/blog-cloudflare/.agents/skills/building-emdash-site/references/site-features.md b/templates/blog-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/blog-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/blog-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/blog-cloudflare/src/pages/posts/[slug].astro b/templates/blog-cloudflare/src/pages/posts/[slug].astro
index 0d45757775..89deb7de9a 100644
--- a/templates/blog-cloudflare/src/pages/posts/[slug].astro
+++ b/templates/blog-cloudflare/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/templates/blog/.agents/skills/building-emdash-site/SKILL.md b/templates/blog/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/blog/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/blog/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/blog/.agents/skills/building-emdash-site/references/site-features.md b/templates/blog/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/blog/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/blog/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/blog/src/pages/posts/[slug].astro b/templates/blog/src/pages/posts/[slug].astro
index 0d45757775..89deb7de9a 100644
--- a/templates/blog/src/pages/posts/[slug].astro
+++ b/templates/blog/src/pages/posts/[slug].astro
@@ -10,10 +10,9 @@ import {
import {
Image,
PortableText,
- Comments,
- CommentForm,
WidgetArea,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import Base from "../../layouts/Base.astro";
import PostCard from "../../components/PostCard.astro";
import { getReadingTime } from "../../utils/reading-time";
diff --git a/templates/marketing-cloudflare/.agents/skills/building-emdash-site/SKILL.md b/templates/marketing-cloudflare/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/marketing-cloudflare/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/marketing-cloudflare/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/marketing-cloudflare/.agents/skills/building-emdash-site/references/site-features.md b/templates/marketing-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/marketing-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/marketing-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/marketing/.agents/skills/building-emdash-site/SKILL.md b/templates/marketing/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/marketing/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/marketing/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/marketing/.agents/skills/building-emdash-site/references/site-features.md b/templates/marketing/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/marketing/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/marketing/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/SKILL.md b/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/references/site-features.md b/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/portfolio-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/portfolio/.agents/skills/building-emdash-site/SKILL.md b/templates/portfolio/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/portfolio/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/portfolio/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/portfolio/.agents/skills/building-emdash-site/references/site-features.md b/templates/portfolio/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/portfolio/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/portfolio/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/starter-cloudflare/.agents/skills/building-emdash-site/SKILL.md b/templates/starter-cloudflare/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/starter-cloudflare/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/starter-cloudflare/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/starter-cloudflare/.agents/skills/building-emdash-site/references/site-features.md b/templates/starter-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/starter-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/starter-cloudflare/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---
diff --git a/templates/starter/.agents/skills/building-emdash-site/SKILL.md b/templates/starter/.agents/skills/building-emdash-site/SKILL.md
index ad3facde73..8cdb36752b 100644
--- a/templates/starter/.agents/skills/building-emdash-site/SKILL.md
+++ b/templates/starter/.agents/skills/building-emdash-site/SKILL.md
@@ -102,13 +102,12 @@ import { getByline, getBylineBySlug } from "emdash";
import {
PortableText,
Image,
- Comments,
- CommentForm,
WidgetArea,
EmDashHead,
EmDashBodyStart,
EmDashBodyEnd,
} from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
import LiveSearch from "emdash/ui/search";
// Page context (for plugin contributions)
diff --git a/templates/starter/.agents/skills/building-emdash-site/references/site-features.md b/templates/starter/.agents/skills/building-emdash-site/references/site-features.md
index cbfbe8347b..f957f952b4 100644
--- a/templates/starter/.agents/skills/building-emdash-site/references/site-features.md
+++ b/templates/starter/.agents/skills/building-emdash-site/references/site-features.md
@@ -288,7 +288,7 @@ Built-in comments system:
```astro
---
-import { Comments, CommentForm } from "emdash/ui";
+import { Comments, CommentForm } from "emdash/ui/comments";
---