This is the repositry for the swedbankpay/jekyll-plantuml
Docker
image. The purpose of the image is to have a shared Docker image to run
Jekyll sites with PlantUML support (via the
kramdown-plantuml Ruby Gem).
The Docker image is outfitted with an entrypoint
that allows you
to run a few commands inside the container. these commands are described below.
To have Jekyll serve content from the current working directory, simply execute the following:
docker run --tty --volume $(pwd):/srv/jekyll swedbankpay/jekyll-plantuml:latest serve
To build the content in the current working directory and have the results spit
out to a _site
sub-directory, execute the following:
docker run --tty --volume $(pwd):/srv/jekyll swedbankpay/jekyll-plantuml:latest build
The build
command also takes an argument:
Verifies that the built HTML is valid using HTMLProofer.
There is also a special deploy
command which will execute Git Directory
Deploy in order to perform a jekyll build
and then deploy the resulting
HTML to the gh-pages
branch (by default):
docker run --tty \
--volume $(pwd):/srv/jekyll \
--env GIT_DEPLOY_REPO="${GIT_DEPLOY_REPO}" \
--env GIT_DEPLOY_BRANCH="${GIT_DEPLOY_BRANCH}" \
swedbankpay/jekyll-plantuml:latest \
deploy
The deploy
command takes the following environment variables:
Required. The URL of the repository to deploy (git push
) to. Must include
a Personal Access Token in the URL as such:
https://${{ secrets.GH_PAGES_TOKEN }}@github.com/${{ github.repository }}.git
Optional. The branch to deploy to. Default gh-pages
.
The deploy
command also takes arguments:
Performs a full deployment, but doesn't push the results to the remote origin
.
The Docker image exposes one volume: /srv/jekyll
. Map this to the local
directory you want Jekyll to use as its source content directory for jekyll build
, jekyll serve
, etc. Simply put, this is where your .md
files are
placed.
While it is highly recommended to install Jekyll locally and
initialize a Jekyll site with jekyll new <name>
, this is not required to
serve or convert .md
files with jekyll-plantuml
.
This is achieved by shipping a default Gemfile
and default
_config.default.yml
with the Docker container that is used in the
case that a Gemfile
and/or _config.yml
file can't be found locally.
If you want a full Jekyll site with local config, custom plugins, etc., you need
to install Jekyll and initialize the folder you build
or serve
with it
according to Jekyll's documentation.
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct and sign the contributor's license agreement.
The code within this repository is available as open source under the terms of the Apache 2.0 License and the contributor's license agreement.