Support both content.config.* and src/content/config.* patterns for Astro content collections

Co-authored-by: estruyf <2900833+estruyf@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-06-13 12:47:05 +00:00
parent 7d5fde1182
commit bb9ea9f1b9

View File

@@ -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, []);