Follow these steps to setup a Jekyll environment for the documentation of the project.
Install Docker and start daemon
Clone the ASP.NET5CO repository
Run Jekyll container from Docker Hub inside the repository directory. The first time will take a few minutes since it will download the docker image and build it.
Install all dependencies
Get out of the container.
Create a Docker image from the container using the container id shown in the
container prompt, in this case is
29bfc31d9ce3 and we’re naming it
Stop and remove original container used to create the image
Building and serving the documentation site
You’re done, to locally build and serve the documentation you need to do 2 things:
- Start a temporary container with the image created above
- Run the Make target
To start a temporary container you run the below commands
What I do is I create short script at
bin/localserver which sets a few
details of my host machine including the host port for the HTTP server and runs
above command. Then I run such script with the Make target
Then inside the container you run the Make target
The docker container will execute the Jekyll server and serve the contents on the selected host port.