Sign inSign up

jmlemetayer/github-pages

By jmlemetayer

•Updated almost 2 years ago

GitHub Pages server in a docker

Image
0

1.4K

jmlemetayer/github-pages repository overview

dockeri.co

⁠Quick Start

Run the GitHub Pages server docker image. First move to the directory where the GitHub Pages sources are located:

docker run --rm --tty --publish 4000:4000 \
    --volume ${PWD}:/var/lib/github-pages \
    jmlemetayer/github-pages

⁠GitHub Metadata

The GitHub Metadata plugin⁠ (i.e. site.github) works as is if the directory is also a git repository and there is a valid git remote named origin.

⁠Authentication

For some fields, like cname, you need to authenticate yourself. Begin by generating a new personal access token on GitHub.com:

Now you can use the JEKYLL_GITHUB_TOKEN environment variable:

docker run --rm --tty --publish 4000:4000 \
    --volume ${PWD}:/var/lib/github-pages \
    --env JEKYLL_GITHUB_TOKEN=123mytoken321 \
    jmlemetayer/github-pages

⁠Overrides

You can override the site.repository by using the PAGES_REPO_NWO environment variable:

docker run --rm --tty --publish 4000:4000 \
    --volume ${PWD}:/var/lib/github-pages \
    --env PAGES_REPO_NWO=username/repo-name \
    jmlemetayer/github-pages

Tag summary

Content type

Image

Digest

sha256:d2997a563…

Size

188.4 MB

Last updated

almost 2 years ago

docker pull jmlemetayer/github-pages