From 377aa6052e580cc01dacce9e18fbe4d4856fdca2 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 30 Nov 2024 18:26:46 +0100 Subject: [PATCH] fix(v5): broken link and missing type annotations in tutorial (#10119) --- src/content/docs/en/tutorial/5-astro-api/1.mdx | 2 +- src/content/docs/en/tutorial/5-astro-api/2.mdx | 6 +++--- src/content/docs/en/tutorial/5-astro-api/3.mdx | 2 +- src/content/docs/en/tutorial/6-islands/4.mdx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/en/tutorial/5-astro-api/1.mdx b/src/content/docs/en/tutorial/5-astro-api/1.mdx index e658dd45a65b5..0ed3ab7b91bd9 100644 --- a/src/content/docs/en/tutorial/5-astro-api/1.mdx +++ b/src/content/docs/en/tutorial/5-astro-api/1.mdx @@ -167,7 +167,7 @@ Try on your own to make all the necessary changes to your Astro project so that

This is where I will post about my journey learning Astro.

``` diff --git a/src/content/docs/en/tutorial/5-astro-api/2.mdx b/src/content/docs/en/tutorial/5-astro-api/2.mdx index d572f51623e26..95ede7bb2efa6 100644 --- a/src/content/docs/en/tutorial/5-astro-api/2.mdx +++ b/src/content/docs/en/tutorial/5-astro-api/2.mdx @@ -251,10 +251,10 @@ import BlogPost from '../../components/BlogPost.astro'; export async function getStaticPaths() { const allPosts = Object.values(await import.meta.glob('../posts/*.md', { eager: true })); - const uniqueTags = [...new Set(allPosts.map((post) => post.frontmatter.tags).flat())]; + const uniqueTags = [...new Set(allPosts.map((post: any) => post.frontmatter.tags).flat())]; return uniqueTags.map((tag) => { - const filteredPosts = allPosts.filter((post) => post.frontmatter.tags.includes(tag)); + const filteredPosts = allPosts.filter((post: any) => post.frontmatter.tags.includes(tag)); return { params: { tag }, props: { posts: filteredPosts }, @@ -268,7 +268,7 @@ const { posts } = Astro.props;

Posts tagged with {tag}

``` diff --git a/src/content/docs/en/tutorial/5-astro-api/3.mdx b/src/content/docs/en/tutorial/5-astro-api/3.mdx index 46f100ed2b3a8..a91059fc74058 100644 --- a/src/content/docs/en/tutorial/5-astro-api/3.mdx +++ b/src/content/docs/en/tutorial/5-astro-api/3.mdx @@ -361,7 +361,7 @@ const { frontmatter } = Astro.props; {frontmatter.image.alt}
- {frontmatter.tags.map((tag) => ( + {frontmatter.tags.map((tag: string) => (

{tag}

))}
diff --git a/src/content/docs/en/tutorial/6-islands/4.mdx b/src/content/docs/en/tutorial/6-islands/4.mdx index de2af8061a73b..27f5719d48975 100644 --- a/src/content/docs/en/tutorial/6-islands/4.mdx +++ b/src/content/docs/en/tutorial/6-islands/4.mdx @@ -346,4 +346,4 @@ The tutorial blog project includes an RSS feed. This function must also use `get } ``` -For the full example of the blog tutorial using content collections, see the [Content Collections branch](https://github.com/withastro/blog-tutorial-demo/tree/content-layer) of the tutorial repo. +For the full example of the blog tutorial using content collections, see the [Content Collections branch](https://github.com/withastro/blog-tutorial-demo/tree/content-collections) of the tutorial repo.