add netlify.toml

This commit is contained in:
Hiiruki 2023-09-03 20:41:12 +07:00
parent 7b0b8f9752
commit b12b7570e9
No known key found for this signature in database
GPG Key ID: E40D7521AF5886C8
2 changed files with 12 additions and 1 deletions

View File

@ -9,7 +9,7 @@ enableRobotsTXT: true
buildDrafts: false buildDrafts: false
buildFuture: false buildFuture: false
buildExpired: false buildExpired: false
enableGitInfo: false # https://gohugo.io/variables/git/#gitinfo-variables enableGitInfo: true # https://gohugo.io/variables/git/#gitinfo-variables
permalinks: permalinks:
posts: "/:filename" posts: "/:filename"

11
netlify.toml Normal file
View File

@ -0,0 +1,11 @@
[build]
publish = "public"
command = "hugo --gc --minify"
[build.environment]
HUGO_VERSION = "0.118.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
[context.deploy-preview]
command = "sed -i 's/! Content-Security-Policy//g' static/_headers && hugo --minify"