Skip to content

Commit

Permalink
fix: missing body type on content layer entries (#12123)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Oct 4, 2024
1 parent bd25d3f commit b8673df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thin-trains-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes missing `body` property on CollectionEntry types for content layer entries
2 changes: 1 addition & 1 deletion packages/astro/src/content/types-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b8673df

Please sign in to comment.