Warning: Broken English below!
Before I made this...
I learnd Jekyll from the docs
Learned Jekyll + Webpack + React from this Medium(I read it before I learned how to use Webpack) to see if it is possible to use Jekyll with React. Yes! It is.
Learned basic Webpack from its docs. From chapter 'Getting Started' to 'Development' which I created another repo when I was learning it at webpack-demo
And lastly, I read this blog on how to set up React, Webpack 4, and Babel (2018) (very easy to understand).
So, if you're not familiar with the 3 main things I mentioned above, it may be difficult to grasp the whole repo. I suggest you to learn Jekyll, Webpack, and React first. Just basic understanding of it will make your life easier.
When I integrated Jekyll and Webpack, there was a problem, the Jekyll server get an error
Error: `/' not found
I tried changing base_url
value in _config.yml
to be '/public'
but it didn't work. I found out that because I'd run Jekyll server in detach mode (on background). I decided to restart the server but the doc gave me no idea on how to did it. Then, I found this StackOverflow answer:
To stop Jekyll running server running in detach mode (running in background)
ps aux | grep jekyll | awk '{print $2}' | xargs kill -9
and just re-serve it
jekyll serve
It works now!