-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (39 loc) · 1.04 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
43
44
45
46
47
48
CONTAINER_IP = $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' charlesbot.org)
.PHONY: help
help:
@echo Start with "make hugo" and go from there
.PHONY: go
go:
go get -v github.com/spf13/hugo
themes: go
mkdir -p themes
cd themes; git clone https://github.com/marvinpinto/hugo-strata-theme.git || true
cd themes/hugo-strata-theme; git checkout -f relative-url-references
travis-linkchecker:
linkchecker http://127.0.0.1:8080
server: clean themes
@echo ===========================================================
@echo Head over to http://$(CONTAINER_IP):8080 for a live preview
@echo ===========================================================
hugo server \
--bind="0.0.0.0" \
--port=8080 \
--baseUrl="http://$(CONTAINER_IP)" \
--watch
travis-server:
hugo server \
--bind="127.0.0.1" \
--port=8080 \
--baseUrl="http://127.0.0.1" \
--watch=false
.PHONY: generate
generate: clean themes
hugo
.PHONY: clean
clean:
rm -rf public
rm -f Gemfile.lock
.PHONY: clean-all
clean-all: clean
rm -rf themes
rm -rf /tmp/go