Remove .mdx (not compatible) from import.meta.glob
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import { getNormalizedPost } from "~/utils/getNormalizedPost";
|
import { getNormalizedPost } from "~/utils/getNormalizedPost";
|
||||||
|
|
||||||
const load = async function () {
|
const load = async function () {
|
||||||
const posts = import.meta.glob("~/data/posts/**/*.{md,mdx}", {
|
const posts = import.meta.glob("~/data/posts/**/*.md", {
|
||||||
eager: true,
|
eager: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -29,9 +29,9 @@ export const findPostsByIds = async (ids) => {
|
|||||||
|
|
||||||
const posts = await fetchPosts();
|
const posts = await fetchPosts();
|
||||||
|
|
||||||
return ids.reduce(function (r, a) {
|
return ids.reduce(function (r, id) {
|
||||||
posts.some(function (el) {
|
posts.some(function (post) {
|
||||||
return a === el.slug && r.push(el);
|
return id === post.ID && r.push(post);
|
||||||
});
|
});
|
||||||
return r;
|
return r;
|
||||||
}, []);
|
}, []);
|
||||||
|
Reference in New Issue
Block a user