docker-github-pages icon indicating copy to clipboard operation
docker-github-pages copied to clipboard

Export _site directory

Open royfrancis opened this issue 5 years ago • 1 comments
trafficstars

This works great to run the site in my browser. But, how do I modify it such it exports _site directory from the container into my host working directory?

royfrancis avatar Sep 11 '20 14:09 royfrancis

I had the same problem and just solved it. You need to add ./_site:/_site to the volumes section of your docker-compose.yml file.

Here's how mine reads:

version: '3'
services:
  jekyll:
    image: starefossen/github-pages
    environment:
      - "JEKYLL_GITHUB_TOKEN:"
    ports:
      - "4000:4000"
    volumes:
      - ./:/usr/src/app:rw
      - ./_site:/_site
    tty: true

bredd avatar Feb 25 '22 19:02 bredd