Skip to content

Commit

Permalink
remove Js.Array2
Browse files Browse the repository at this point in the history
  • Loading branch information
jderochervlk committed Dec 3, 2024
1 parent 59125b6 commit 0654642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/BlogApi.res
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ let getAllPosts = () => {
}
})

let communityPosts = mdxFiles(communityPostsDirectory)->Js.Array2.map(path => {
let communityPosts = mdxFiles(communityPostsDirectory)->Array.map(path => {
let {GrayMatter.data: data} =
Node.Path.join2(communityPostsDirectory, path)->Node.Fs.readFileSync->GrayMatter.matter
switch BlogFrontmatter.decode(data) {
| Error(msg) => Js.Exn.raiseError(msg)
| Error(msg) => Exn.raiseError(msg)
| Ok(d) => {
path: Node.Path.join2("community", path),
frontmatter: d,
Expand Down

0 comments on commit 0654642

Please sign in to comment.