Skip to content

Commit c618470

Browse files
committed
Try to get the build working with PageFind
Signed-off-by: Chris Abraham <[email protected]>
1 parent 4dd2233 commit c618470

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
serve:
2+
hugo server \
3+
--disableFastRender \
4+
--buildDrafts \
5+
--buildFuture \
6+
--ignoreCache
7+
--printI18nWarnings \
8+
--printMemoryUsage \
9+
--printPathWarnings \
10+
--printUnusedTemplates \
11+
--templateMetrics \
12+
--templateMetricsHints \
13+
--gc
14+
15+
production-build:
16+
git submodule update --init --recursive
17+
hugo \
18+
--minify
19+
npx -y pagefind --site public
20+
21+
preview-build:
22+
git submodule update --init --recursive
23+
hugo \
24+
--baseURL $(DEPLOY_PRIME_URL) \
25+
--buildDrafts \
26+
--buildFuture \
27+
--minify
28+
npx -y pagefind --site public

netlify.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build]
2+
publish = "public"
3+
command = "make production-build"
4+
15
[build.environment]
26
NODE_VERSION = "18.16.1"
37
HUGO_VERSION = "0.115.2"
@@ -6,4 +10,10 @@ HUGO_VERSION = "0.115.2"
610
HUGO_ENV = "production"
711

812
[context.deploy-preview.environment]
9-
HUGO_ENV = "preview"
13+
HUGO_ENV = "preview"
14+
15+
[context.deploy-preview]
16+
command = "make preview-build"
17+
18+
[context.branch-deploy]
19+
command = "make preview-build"

0 commit comments

Comments
 (0)