The issue is the project need to read the content from the multiple markdown file (md extension file) from github.
Using require.context provided by webpack, I can import all file with md extension into an array:
const markdownContext = require.context('../docs', false, /\.md$/); const markdownFiles = markdownContext .keys()
keys(): is a function that returns an array of all possible requests that the context module can handle.
After that, use fetch function to get all the content of md extension file and show to users the specific content when user click on the link
After four weeks of Hacktoberfest, I have learned that you need to go out of your comfort zone in order to get involve in the open world community. I am happy that I can learn more things after joining in this event.