summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alfredo González Martínez <48945157+alfredogonzalezmartinez@users.noreply.github.com> 2022-07-28 14:13:27 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-28 08:13:27 -0400
commitc565465a964ee14bf5d55c0a6eaf1091d3a68429 (patch)
treedaf96124e886e0e021059f368b4db7474696e9dd
parent9697649d31daa64ecb98874ea83d5f7d1b020ea9 (diff)
downloadastro-c565465a964ee14bf5d55c0a6eaf1091d3a68429.tar.gz
astro-c565465a964ee14bf5d55c0a6eaf1091d3a68429.tar.zst
astro-c565465a964ee14bf5d55c0a6eaf1091d3a68429.zip
Add properties (url, file) to MarkdownContent type (#4028)
'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
-rw-r--r--.changeset/quick-onions-itch.md5
-rw-r--r--packages/astro/src/@types/astro.ts2
2 files changed, 7 insertions, 0 deletions
diff --git a/.changeset/quick-onions-itch.md b/.changeset/quick-onions-itch.md
new file mode 100644
index 000000000..68bc505b3
--- /dev/null
+++ b/.changeset/quick-onions-itch.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Add `url` and `file` properties to `MarkdownContent` type
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index 5003f42ab..570df260c 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -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;
};
/**