-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
61 lines (42 loc) · 1.29 KB
/
justfile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env just --justfile
# https://hub.docker.com/layers/jekyll/jekyll/4.2.0/images/sha256-1ead0631cb82fdbd5950a5eb5b4bfbec5e6e97bb234afc058072e3f32e537751?context=explore
docker_image := "jekyll/jekyll:4.2.0@sha256:1ead0631cb82fdbd5950a5eb5b4bfbec5e6e97bb234afc058072e3f32e537751"
# Default target, show list of available commands
help:
#!/usr/bin/env sh
echo "Recipes for working with the blog"
just --list
# Build the site, output goes to _site folder
build:
#!/usr/bin/env sh
set -e
docker_image={{docker_image}}
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it $docker_image \
jekyll build
# Initialize a new site with jekyll. Keep this for reference, not requried anymore.
new:
#!/usr/bin/env sh
set -e
docker_image={{docker_image}}
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it $docker_image \
jekyll new .
# Build and serve the site locally on port 4000
serve:
#!/usr/bin/env sh
set -e
docker_image={{docker_image}}
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
--publish 4000:4000 \
$docker_image \
jekyll serve
# Cleanup all build output
clean:
#!/usr/bin/env sh
set -e
rm -r _site
rm -r .jekyll-cache