From bb9ea9f1b961e7f350a2f59e9e900de8f878cf92 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Jun 2025 12:47:05 +0000 Subject: [PATCH] Support both content.config.* and src/content/config.* patterns for Astro content collections Co-authored-by: estruyf <2900833+estruyf@users.noreply.github.com> --- src/listeners/dashboard/SsgListener.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/listeners/dashboard/SsgListener.ts b/src/listeners/dashboard/SsgListener.ts index 2b5ad5dd..44a56cb7 100644 --- a/src/listeners/dashboard/SsgListener.ts +++ b/src/listeners/dashboard/SsgListener.ts @@ -114,7 +114,12 @@ export class SsgListener extends BaseListener { } // https://github.com/withastro/astro/blob/defab70cb2a0c67d5e9153542490d2749046b151/packages/astro/src/content/utils.ts#L450 - const contentConfig = await workspace.findFiles(`**/src/content/config.*`); + let contentConfig = await workspace.findFiles(`**/src/content/config.*`); + + // Also search for content.config.* files (newer pattern) + if (contentConfig.length === 0) { + contentConfig = await workspace.findFiles(`**/content.config.*`); + } if (contentConfig.length === 0) { SsgListener.sendRequest(command as any, requestId, []);