More Premium Hugo Themes Premium Jekyll Themes

Jekyll Serve

Jekyll in a Docker Container For Easy SSG Development

Jekyll Serve

Jekyll in a Docker Container For Easy SSG Development

Author Avatar Theme by bretfisher
Github Stars Github Stars: 358
Last Commit Last Commit: Mar 7, 2023 -
First Commit Created: Dec 18, 2023 -
Jekyll Serve screenshot

Overview:

This product analysis is focused on the usage and features of two Docker images, namely bretfisher/jekyll and bretfisher/jekyll-serve. These images provide a convenient way to run Jekyll, a static site generator, within a Docker container. The bretfisher/jekyll image is designed for general CLI commands, while the bretfisher/jekyll-serve image is tailored for local Jekyll site development. The author emphasizes that these images are not intended for production use, but rather for development and testing purposes.

Features:

  • Two Docker images: The bretfisher/jekyll image allows running various Jekyll CLI commands, while the bretfisher/jekyll-serve image provides a local server for Jekyll site development.
  • Mounting the current path: Both images mount the current directory as the /site directory within the container, making it easy to work with local Jekyll projects.
  • Sane defaults: The bretfisher/jekyll-serve image sets up Jekyll server with sensible defaults, making it convenient for local development without extensive configuration.
  • Easy setup with docker-compose: The setup process is simplified by providing a docker-compose.yml file that can be copied into the Jekyll site root directory, reducing the required commands to start the server.

Installation:

To create a Jekyll site using the Docker images, follow these steps:

  1. Start by creating a Jekyll site using the bretfisher/jekyll image:
docker run -v $(pwd):/site bretfisher/jekyll new .
  1. To start a local server with sane defaults, use the bretfisher/jekyll-serve image:
docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve
  1. Access the Jekyll site at http://<docker-host>:4000, where <docker-host> refers to the host running Docker.

Alternatively, you can simplify the setup process by copying the provided docker-compose.yml file into your Jekyll site root directory. Then, you can start the server using the following command:

docker-compose up

Summary:

The bretfisher/jekyll and bretfisher/jekyll-serve Docker images provide a convenient way to run Jekyll, a static site generator, within a Docker container. The bretfisher/jekyll image is suitable for general CLI commands, while the bretfisher/jekyll-serve image is tailored for local Jekyll site development. However, it’s important to note that these images are not intended for production use. The setup process is simplified by providing a Docker Compose file, and the current directory can be mounted into the container for easy access to Jekyll projects.