Skip to content

Commit

Permalink
feat: update netlify.toml for netlify-cli use
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Mar 17, 2021
1 parent 4718d58 commit 20bac2a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
functions
node_modules
public
resources
resources
# Local Netlify folder
.netlify
15 changes: 11 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@
publish = "public"
functions = "functions"

[dev]
framework = "#custom"
command = "npx hugo server --disableFastRender"
targetPort = 1313
port = 8888
publish = "public"
autoLaunch = false

[build.environment]
HUGO_VERSION = "0.80.0"
NODE_VERSION = "15.5.1"
NPM_VERSION = "7.3.0"

[context.production]
command = "hugo -b $URL --gc --minify && npm run build:functions"
command = "npx hugo --gc --minify && npm run build:functions"

[context.deploy-preview]
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
77 changes: 49 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20bac2a

Please sign in to comment.