Use this template and expand on it if you want to create a Jekyll webpage.
- The easiest way that I found to work with Jekyll pages is to use the Jekyll docker image. Start by pulling the image:
docker pull jekyll/jekyll
- Now create your own repository by using this repository as a template. Click on the green
Use this template
button. - Clone the new repository to your harddrive. Let's say you clone it to
/home/you/mywebsite
. - To serve the website type the following in the command line:
docker run --rm --name jekyll --volume="/home/you/mywebsite:/srv/jekyll" --publish 4000:4000 jekyll/jekyll jekyll serve
- You can now edit any of the files. As soon as you save the site will be rebuilt and you can view it on
http://localhost:4000
- Obviously you should replace all instances of
/home/you/mywebsite
with the name of the directory where you actually are saving the files. - Make sure you set the source branch for building GitHub pages to
main
. This can be done by clicking onSettings
, i.e. Settings for the project and not for your GitHub account. Then, click onPages
. Look for the heading Source and selectBranch:main
. Save the change.