-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
29 lines (23 loc) · 852 Bytes
/
netlify.toml
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
[build]
publish = "public"
command = "hugo && npx pagefind --site public --output-subdir pagefind"
[build.environment]
HUGO_VERSION = "0.145.0" # Replace with your current Hugo version
NODE_VERSION = "18" # Ensure we have a recent Node version for Pagefind
[context.production.environment]
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
[context.deploy-preview]
command = "hugo --buildFuture -b $DEPLOY_PRIME_URL && npx pagefind --site public --output-subdir pagefind"
[context.branch-deploy]
command = "hugo --buildFuture -b $DEPLOY_PRIME_URL && npx pagefind --site public --output-subdir pagefind"
# Redirect for Netlify
[[redirects]]
from = "/*"
to = "/404.html"
status = 404
# Cache control for Pagefind files
[[headers]]
for = "/pagefind/*"
[headers.values]
Cache-Control = "public, max-age=604800"