-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjekyll_locally.txt
More file actions
57 lines (26 loc) · 1.5 KB
/
jekyll_locally.txt
File metadata and controls
57 lines (26 loc) · 1.5 KB
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
# Run local jekyll for pragma-git github pages
# Run stored state
# Start docker
cd '/Users/jan/Documents/Projects/Pragma-git/pragma-git.github.io/docs'
docker run --rm --volume="$PWD:/srv/jekyll" -p 4000:4000 -it local-pragma-git.github.io /bin/bash
# In docker
export PAGES_REPO_NWO=pragma-git/pragma-git.github.io;jekyll serve --watch --drafts # Ctrl-C followed by Exit to end
# Browser
http://localhost:4000
# PREPARATIONS :
# From https://ddewaele.github.io/running-jekyll-in-docker/
# Set up and run from inside docker image
export JEKYLL_VERSION=3.8
docker run --name local-pragma-git.github.io --rm --volume="$PWD:/srv/jekyll" -p 4000:4000 -it jekyll/jekyll:$JEKYLL_VERSION /bin/bash
bundle update
bundle install
export PAGES_REPO_NWO=pragma-git/pragma-git.github.io;jekyll serve --watch --drafts
# Store state
# Start docker
export JEKYLL_VERSION=3.8
docker run --rm --volume="$PWD:/srv/jekyll" -p 4000:4000 -it jekyll/jekyll:$JEKYLL_VERSION /bin/bash
# In docker
export PAGES_REPO_NWO=pragma-git/pragma-git.github.io;jekyll serve --watch --drafts
# Store state (in other terminal, last parameter is stored image name)
docker ps
docker commit c3f279d17e0a local-pragma-git.github.io