Skip to content

Commit

Permalink
Add properties (url, file) to MarkdownContent type (#4028)
Browse files Browse the repository at this point in the history
'url' and 'file' properties were missing in MarkdownContent type,
but they should there according to:
https://docs.astro.build/en/guides/markdown-content/#markdown-layouts
  • Loading branch information
alfredogonzalezmartinez authored Jul 28, 2022
1 parent 9697649 commit c565465
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-onions-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Add `url` and `file` properties to `MarkdownContent` type
2 changes: 2 additions & 0 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,8 @@ export interface MarkdownParserResponse extends MarkdownRenderingResult {
*/
export type MarkdownContent<T extends Record<string, any> = Record<string, any>> = T & {
astro: MarkdownMetadata;
url: string | undefined;
file: string;
};

/**
Expand Down

0 comments on commit c565465

Please sign in to comment.