0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix: missing body type on content layer entries (#12123)

This commit is contained in:
Erika 2024-10-04 14:15:46 +02:00 committed by GitHub
parent bd25d3ff8e
commit b8673df51c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fixes missing `body` property on CollectionEntry types for content layer entries

View file

@ -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 filePath?: string \n}>;\n`;
dataTypesStr += `${collectionKey}: Record<string, {\n id: string;\n collection: ${collectionKey};\n data: ${dataType};\n rendered?: RenderedContent;\n filePath?: string;\n body?: string \n}>;\n`;
break;
case 'data':
if (collectionEntryKeys.length === 0) {