Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile - github.com/peaceiris/hugo-theme-iris.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f0f2c4ac9376dfcd3521f6bac389e03a1398604 (plain)
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
pwd := $(CURDIR)
cmd := ""
DOCKER_COMPOSE := docker-compose
OPEN_BROWSER := open http://localhost:1313
BASE_URL := https://hugothemeiris.peaceiris.app/


.PHONY: up
up:
	# $(OPEN_BROWSER)
	$(DOCKER_COMPOSE) up

.PHONY: hugo
hugo:
	$(DOCKER_COMPOSE) run --rm hugo $(cmd)

.PHONY: data
data:
	curl 'https://api.github.com/users/peaceiris/repos?per_page=100&page=1' > ./exampleSite/data/github/peaceiris.json
	# curl 'https://api.github.com/users/hugojapan/repos?per_page=100&page=1' > ./exampleSite/data/github/hugojapan.json

.PHONY: build
build:
	$(eval opt := --gc --minify --themesDir ../ --layoutDir ../layouts --baseURL $(BASE_URL))
	$(DOCKER_COMPOSE) run --rm hugo $(opt)

.PHONY: test
test:
	$(eval opt := --gc --minify --themesDir ../ --layoutDir ../layouts --baseURL $(BASE_URL) --renderToMemory)
	$(DOCKER_COMPOSE) run --rm hugo $(opt)

.PHONY: buildgha
buildgha:
	cd ./exampleSite && \
		hugo --gc --minify --themesDir ../ --layoutDir ../layouts --baseURL $(BASE_URL)