New API:
import fs from "fs"
const post = compileTime(async () => {
const post = await fs.promises.readFile("./post.md", "utf8")
return {
data: { post },
}
})
assert.equal(post, "...the content of the post...")
Just use the magic compileTime
function.