summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Erika <3019731+Princesseuh@users.noreply.github.com> 2024-09-30 19:21:06 +0200
committerGravatar GitHub <noreply@github.com> 2024-09-30 19:21:06 +0200
commit12dae50c776474748a80cb65c8bf1c67f0825cb0 (patch)
tree2705e042d4e7324f1e2c32b44d12fe9bc4a680bf
parent5b70610b0fe402dd9f91f992733e04dc97541fb9 (diff)
downloadastro-12dae50c776474748a80cb65c8bf1c67f0825cb0.tar.gz
astro-12dae50c776474748a80cb65c8bf1c67f0825cb0.tar.zst
astro-12dae50c776474748a80cb65c8bf1c67f0825cb0.zip
chore: changeset (#12084)
-rw-r--r--.changeset/afraid-candles-hear.md5
-rw-r--r--packages/astro/src/content/types-generator.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/afraid-candles-hear.md b/.changeset/afraid-candles-hear.md
new file mode 100644
index 000000000..1e0441e4f
--- /dev/null
+++ b/.changeset/afraid-candles-hear.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Adds missing filePath property on content layer entries
diff --git a/packages/astro/src/content/types-generator.ts b/packages/astro/src/content/types-generator.ts
index faf02d95d..3c0130cf9 100644
--- a/packages/astro/src/content/types-generator.ts
+++ b/packages/astro/src/content/types-generator.ts
@@ -497,7 +497,7 @@ async function writeContentFiles({
contentTypesStr += `};\n`;
break;
case CONTENT_LAYER_TYPE:
- dataTypesStr += `${collectionKey}: Record<string, {\n id: string;\n collection: ${collectionKey};\n data: ${dataType};\n rendered?: RenderedContent \n}>;\n`;
+ dataTypesStr += `${collectionKey}: Record<string, {\n id: string;\n collection: ${collectionKey};\n data: ${dataType};\n rendered?: RenderedContent;\n filePath?: string \n}>;\n`;
break;
case 'data':
if (collectionEntryKeys.length === 0) {