Here is what I did to build this my very first website. I used Jekyll, a static website generator, to build the website, and used GitHub Pages to host this website.
For building the website with Jekyll, I find this video very useful. You can start with a theme you like from Jekyll Themes; my theme is jekyllDecent.
For publishing the website with GitHub Pages, I basically follow this tutorial and this video(I don’t follow their suggestion modifying the head.html and my website just works fine).
Tips:
-
Installing Jekyll: If you use a Mac like I do, it’s likely that
gem install jekyll
does not work (you may check this troubleshooting page). Trysudo gem install jekyll
instead. -
Publishing the website: You need to go to _ config.yml and change
url:
andbaseurl:
to be the base hostname & protocol for your site. If you use the same theme as I do, modify robots.txt as well. Make sure your url is something likehttps://<yourusername>.github.io
, nothttp://...
, which may lead to a display error like This page is trying to load scripts from unauthenticated sources (find the solution here). -
To change the order of your pages shown in the navigation, go to
_pages
, and add aweight: <#orderYouWant>
parameter to the layout section of each page.