Last Pull Request of Hacktoberfest

In the last week of Hacktoberfest, just like the third week, I fix the issue on 10secondsofcode.

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(): 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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at
Get started
%d bloggers like this: