Skip to content

Commit

Permalink
Add properties (url, file) to MarkdownContent type
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 committed Jul 23, 2022
1 parent cb1db13 commit 9340335
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 @@ -857,6 +857,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 9340335

Please sign in to comment.