summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/funny-tomatoes-guess.md5
-rw-r--r--packages/astro/src/content/vite-plugin-content-virtual-mod.ts4
-rw-r--r--packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore.md0
-rw-r--r--packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore/file.md0
4 files changed, 7 insertions, 2 deletions
diff --git a/.changeset/funny-tomatoes-guess.md b/.changeset/funny-tomatoes-guess.md
new file mode 100644
index 000000000..cd8b65b49
--- /dev/null
+++ b/.changeset/funny-tomatoes-guess.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Ignore content .json files prefixed with underscores (regression)
diff --git a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
index 62ba612e9..021a26314 100644
--- a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
+++ b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
@@ -213,7 +213,7 @@ function globWithUnderscoresIgnored(relContentDir: string, exts: string[]): stri
const contentDir = appendForwardSlash(relContentDir);
return [
`${contentDir}**/*${extGlob}`,
- `!${contentDir}_*/**${extGlob}`,
- `!${contentDir}_*${extGlob}`,
+ `!${contentDir}**/_*/**${extGlob}`,
+ `!${contentDir}**/_*${extGlob}`,
];
}
diff --git a/packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore.md b/packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore.md
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore.md
diff --git a/packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore/file.md b/packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore/file.md
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/packages/astro/test/fixtures/content-collections/src/content/with-schema-config/_ignore/file.md