tomjoht / documentation-theme-jekyll

A Jekyll-based theme designed for documentation and help systems. See the link for detailed instructions on setting up and configuring everything.

Home Page:http://idratherbewriting.com/documentation-theme-jekyll/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker script to build and watch without installing (Works on windows with wsl 2 and linux)

algenty opened this issue · comments

Hi,

First at all, thx a lot for your theme , i'll try it for my projet grafana-flowcharting (https://github.com/algenty/grafana-flowcharting)
I've created 2 scripts to build and watch without needed to install jekyll or ruby using docker.
Can i suggest to add it into your repo ?
vendor rep cache is ignored in .gitignore
Source : https://github.com/envygeeks/jekyll-docker/blob/master/README.md

######################### build.sh ##########################
`
#!/usr/bin/env bash

_JEKYLL_VERSION="${JEKYLL_VERSION:-3.8}"

docker run --rm \
-it --ipc=host \
--net=host \
--volume="${PWD}:/srv/jekyll:Z" \
--volume="${PWD}/vendor:/usr/local/bundle:Z" \
jekyll/jekyll:${_JEKYLL_VERSION} \
jekyll build
`

######################### watch.sh ##########################
`
#!/usr/bin/env bash

echo "$0 [port]"

_JEKYLL_VERSION="${JEKYLL_VERSION:-3.8}"
_JEKYLL_PORT=${1:-4000}

docker run --rm \
-it --ipc=host \
--net=host \
--publish ${_JEKYLL_PORT}:${_JEKYLL_PORT}
--volume="${PWD}:/srv/jekyll:Z"
--volume="${PWD}/vendor:/usr/local/bundle:Z"
jekyll/jekyll:${_JEKYLL_VERSION}
jekyll serve --port ${_JEKYLL_PORT} --watch
`