We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f603727 commit bc4a0adCopy full SHA for bc4a0ad
src/utils/fetchPosts.js
@@ -1,7 +1,7 @@
1
import { getNormalizedPost } from "~/utils/getNormalizedPost";
2
3
const load = async function () {
4
- const posts = import.meta.glob("~/data/posts/**/*.{md,mdx}", {
+ const posts = import.meta.glob("~/data/posts/**/*.md", {
5
eager: true,
6
});
7
@@ -29,9 +29,9 @@ export const findPostsByIds = async (ids) => {
29
30
const posts = await fetchPosts();
31
32
- return ids.reduce(function (r, a) {
33
- posts.some(function (el) {
34
- return a === el.slug && r.push(el);
+ return ids.reduce(function (r, id) {
+ posts.some(function (post) {
+ return id === post.ID && r.push(post);
35
36
return r;
37
}, []);
0 commit comments