Skip to content

Commit

Permalink
Try to get the build working with PageFind
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Abraham <[email protected]>
  • Loading branch information
cjyabraham committed Mar 24, 2024
1 parent 4dd2233 commit c618470
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
serve:
hugo server \
--disableFastRender \
--buildDrafts \
--buildFuture \
--ignoreCache
--printI18nWarnings \
--printMemoryUsage \
--printPathWarnings \
--printUnusedTemplates \
--templateMetrics \
--templateMetricsHints \
--gc

production-build:
git submodule update --init --recursive
hugo \
--minify
npx -y pagefind --site public

preview-build:
git submodule update --init --recursive
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--minify
npx -y pagefind --site public
12 changes: 11 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build]
publish = "public"
command = "make production-build"

[build.environment]
NODE_VERSION = "18.16.1"
HUGO_VERSION = "0.115.2"
Expand All @@ -6,4 +10,10 @@ HUGO_VERSION = "0.115.2"
HUGO_ENV = "production"

[context.deploy-preview.environment]
HUGO_ENV = "preview"
HUGO_ENV = "preview"

[context.deploy-preview]
command = "make preview-build"

[context.branch-deploy]
command = "make preview-build"

0 comments on commit c618470

Please sign in to comment.