Git Product home page Git Product logo

alpine-jekyll's Introduction

Alpine Jekyll

Jekyll docker image based on Alpine.

Run Jekyll build by default, has a watch mode and support other jekyll commands.

How to use

By default the image will run jekyll build.

Minimal configuration

The container needs to have 2 volumes :

  • the source directory

  • the output directory

    docker run
    -v :/var/_source/
    -v :/var/_site/
    cethy/alpine-jekyll:latest

Example usage with a local directory :

docker run \ 
    -v $PWD/data/source:/var/_source/ \
    -v $PWD/data/_site:/var/_site/ \
    cethy/alpine-jekyll:latest

Watch mode

docker run -ti \
    -v <host source directory>:/var/_source/ \
    -v <host output directory>:/var/_site/ \
    cethy/alpine-jekyll:latest watch

Note : -ti in watch mode is required to be able to stop the container w/ ctrl+c.

Other jekyll commands
docker run -ti cethy/alpine-jekyll:latest <help|new|serve|...> <arg1> <...>

Run help command or go to the jekyll documentation for more informations.

Note : the env variables (OUTPUT_DIR, INPUT_DIR, INPUT_EXTRA_PARAMETERS) do not impact thoses commands.

Full configuration

default configuration

docker run \
    -v <host source directory>:/var/_source/ \
    -v <host output directory>:/var/_site/ \
    -e OUTPUT_DIR='/var/_site' \
    -e INPUT_DIR='/var/_source' \
    -e INPUT_EXTRA_PARAMETERS='' \
    cethy/alpine-jekyll:latest

Options

Build|watch mode

In build mode, the container will build the site and exit.

In watch mode, the jekyll script will look for changes in the INPUT_DIR and rebuild the site each time.

Default Options
build build|watch
OUTPUT_DIR
# default
-e OUTPUT_DIR='/var/_site'

Represents the container output directory.

Default Options
/var/_source <any container directory>
INPUT_DIR
# default
-e INPUT_DIR='/var/_source'

Represents the input directory.

Default Options
/var/_source <any container directory>
INPUT_EXTRA_PARAMETERS
# default
-e INPUT_EXTRA_PARAMETERS=''

Represents the extra parameters you want to send to the jekyll command.

Default Options
- <any acceptable jekyll parameter>

Customize Jekyll

To add plugins to jekyll, you should :

  • clone the repository ;
  • edit the Gemfile ;
  • docker build -t my_alpine-jekyll .

And use your version to build you jekyll websites.

Misc

Related work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.