-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (32 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
JEKYLL_VERSION=3.8
THIS_DIR = $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
DOCKER_CMD=docker
JEKYLL_UID=$(shell id -u)
JEKYLL_GID=$(shell id -g)
DOCKER=$(DOCKER_CMD) run $(INTERACTIVE) --rm --label=jekyll --volume $(THIS_DIR):/srv/jekyll \
-v $(THIS_DIR)/.cache/bundle:/usr/local/bundle \
-e JEKYLL_GID=$(JEKYLL_GID) -e JEKYLL_UID=$(JEKYLL_UID) \
-p 127.0.0.1:4000:4000 jekyll/builder:${JEKYLL_VERSION}
IGNORE_HREFS=""
CONFIG=_config.yml
build: install
$(DOCKER) bundle exec jekyll build --trace --config $(CONFIG)
serve: INTERACTIVE=-it
serve: build
$(DOCKER) bundle exec jekyll serve --config $(CONFIG) --host 0.0.0.0
new:
$(DOCKER) bundle exec jekyll new /srv/jekyll/site
run: INTERACTIVE=-it
run:
$(DOCKER) bash
install:
$(DOCKER) bundle install
gemfile.lock:
$(DOCKER) bundle update
check: build
$(DOCKER) bundle exec htmlproofer _site \
--empty-alt-ignore --allow-hash-href --url-ignore $(IGNORE_HREFS) \
--internal_domains "school.pymor.org" --file-ignore "/past/" --check-html
clean:
rm -rf _site .cache .jekyll-cache
.PHONY: new serve build clean