step 1 : Choose your favorite style template from Jekyll themes, jekyll themes
step 2 : Download the relevant theme and unzip it
step 3 : Run the following command in your terminal
1
docker run -it --rm --volume="$PWD:/srv/jekyll" -p 4000:4000 jekyll/jekyll jekyll serve
Explanation of the command
docker run
-> Executes the specified Docker image, in this case, jekyll/jekyll.-it
->-i
: stands for interactive, keeping the standard input of the container open, allowing you to input commands into the container just like in your local terminal。-it
->-t
: allocates a virtual terminal (tty), presenting the output of commands executed in the container in a friendly manner.--rm
-> Automatically removes the container after it finishes execution, preventing a buildup of unused containers in Docker.--volume="$PWD:/srv/jekyll"
-> Mounts the current directory to the /srv/jekyll directory inside the container, enabling synchronized usage of data between the local machine and the container.-p 4000:4000
-> Maps port 4000 of the host to port 4000 inside the container.jekyll serve
-> Starts a local development server within the Jekyll static site generation framework.