Skip to content

Commit 2ebd8a7

Browse files
authored
Merge pull request #24475 from sftim/20201010_docker_mac_compatibility
Update local Hugo development target
2 parents a675695 + 2518002 commit 2ebd8a7

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ container-image:
6565
--build-arg HUGO_VERSION=$(HUGO_VERSION)
6666

6767
container-build: module-check
68-
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --minify
68+
$(CONTAINER_RUN) --read-only $(CONTAINER_IMAGE) hugo --minify
6969

7070
container-serve: module-check
71-
$(CONTAINER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0
71+
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir
7272

7373
test-examples:
7474
scripts/test_examples.sh install

config.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ enableGitInfo = true
3333
# Hindi is disabled because it's currently in development.
3434
disableLanguages = ["hi", "no"]
3535

36+
[caches]
37+
[caches.assets]
38+
dir = ":cacheDir/_gen"
39+
maxAge = -1
40+
[caches.getcsv]
41+
dir = ":cacheDir/:project"
42+
maxAge = "60s"
43+
[caches.getjson]
44+
dir = ":cacheDir/:project"
45+
maxAge = "60s"
46+
[caches.images]
47+
dir = ":cacheDir/_images"
48+
maxAge = -1
49+
[caches.modules]
50+
dir = ":cacheDir/modules"
51+
maxAge = -1
52+
3653
[markup]
3754
[markup.goldmark]
3855
[markup.goldmark.extensions]

0 commit comments

Comments
 (0)