From b12b7570e9e8af1ea531cb11b2d3b196259093d4 Mon Sep 17 00:00:00 2001 From: Hiiruki Date: Sun, 3 Sep 2023 20:41:12 +0700 Subject: [PATCH] add netlify.toml --- hugo.yml | 2 +- netlify.toml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 netlify.toml diff --git a/hugo.yml b/hugo.yml index a6a9cd9..862db72 100644 --- a/hugo.yml +++ b/hugo.yml @@ -9,7 +9,7 @@ enableRobotsTXT: true buildDrafts: false buildFuture: false buildExpired: false -enableGitInfo: false # https://gohugo.io/variables/git/#gitinfo-variables +enableGitInfo: true # https://gohugo.io/variables/git/#gitinfo-variables permalinks: posts: "/:filename" diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..5bfb9ae --- /dev/null +++ b/netlify.toml @@ -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"