-
Notifications
You must be signed in to change notification settings - Fork 589
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (43 loc) · 1.26 KB
/
Makefile
File metadata and controls
50 lines (43 loc) · 1.26 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
HTMLTEST_DIR=tmp
HTMLTEST?=htmltest # Specify as make arg if different
HTMLTEST_ARGS?=--skip-external
# Use $(HTMLTEST) in PATH, if available; otherwise, we'll get a copy
ifeq (, $(shell which $(HTMLTEST)))
override HTMLTEST=$(HTMLTEST_DIR)/bin/htmltest
ifeq (, $(shell which $(HTMLTEST)))
GET_LINK_CHECKER_IF_NEEDED=get-link-checker
endif
endif
check-links: $(GET_LINK_CHECKER_IF_NEEDED)
$(HTMLTEST) $(HTMLTEST_ARGS)
clean:
rm -rf $(HTMLTEST_DIR) public/* resources
get-link-checker:
rm -Rf $(HTMLTEST_DIR)/bin
curl https://htmltest.wjdp.uk | bash -s -- -b $(HTMLTEST_DIR)/bin
serve:
npx hugo server \
--disableFastRender \
--buildDrafts \
--buildFuture \
--ignoreCache \
--printI18nWarnings \
--printMemoryUsage \
--printPathWarnings \
--printUnusedTemplates \
--templateMetrics \
--templateMetricsHints \
--gc
production-build:
npx hugo mod clean --all
npx hugo mod get github.com/google/[email protected] github.com/google/docsy/[email protected]
npx hugo --minify
npx -y pagefind --site public
preview-build:
npx hugo mod clean --all
npx hugo mod get github.com/google/[email protected] github.com/google/docsy/[email protected]
npx hugo --minify \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture
npx -y pagefind --site public