ここには、私がAstroを学んでいく旅の様子を投稿します。
- {allPosts.map((post) => )}
+ {allPosts.map((post: any) => )}
```
@@ -186,7 +186,7 @@ Astroコンポーネントに以下のコードが含まれているとします
```astro
---
-const myPosts = await Astro.glob('../pages/posts/*.md');
+const myPosts = Object.values(import.meta.glob('./posts/*.md', { eager: true }));
---
```
@@ -244,4 +244,8 @@ const myPosts = await Astro.glob('../pages/posts/*.md');
- [ ] ローカルファイルのデータを取得できる。
- [ ] ブログ記事のリストを表示できる。
-
\ No newline at end of file
+
+
+### 参考
+
+- [globパターンでインポートする](/ja/guides/imports/#importmetaglob)