Consider I have a folder with .md
files like this:
/static/blog/
example_title.md
another_example.md
three_examples.md
and I have an array including all titles:
const blogEntries = ["example_title", "another_example", "three_examples"]
in my component I want to import
all of them, notice that there could be fewer or more.
Is there any way to dynamically import them similar to:
for (let entry in blogEntries) {
import `Markdown_${entry}` from `/static/blog/${entry}.md`
}
and later in my render I can do:
<Markdown_three_examples />
the above obviously would not work, but I'm looking for a way to achieve similar.