update hugo build options

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
master
Toshaan Bharvani 2 weeks ago
parent e18cba82dd
commit ba115c4276

@ -1,6 +1,8 @@
#!Makefile #!Makefile


HUGO=hugo-extended HUGO=hugo-extended
HUGO_NUMWORKERMULTIPLIER=64
HUGO_MEMORYLIMIT=32
BUILDNAME:=$(shell git rev-parse --abbrev-ref HEAD) BUILDNAME:=$(shell git rev-parse --abbrev-ref HEAD)
BASEURL:=$(shell basename `pwd` | sed 's/_/./g') BASEURL:=$(shell basename `pwd` | sed 's/_/./g')
BRANCHES:=$(shell git branch -r | sed 's/origin\///g' | sed 's/pr\//pr-/' | sed '/HEAD/d' | sed '/master/d' | sed '/main/d') BRANCHES:=$(shell git branch -r | sed 's/origin\///g' | sed 's/pr\//pr-/' | sed '/HEAD/d' | sed '/master/d' | sed '/main/d')
@ -28,7 +30,7 @@ build-staging:


.PHONY: test .PHONY: test
test: clean test: clean
$(HUGO) --environment=development --minify --templateMetrics --templateMetricsHints --memstats hug_mem_log HUGO_NUMWORKERMULTIPLIER=$(HUGO_NUMWORKERMULTIPLIER) HUGO_MEMORYLIMIT=$(HUGO_MEMORYLIMIT) $(HUGO) --environment=development --minify --printMemoryUsage --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints


.PHONY: draft .PHONY: draft
draft: draft:

@ -22,6 +22,14 @@ enableEmoji = true
noJSConfigInAssets = false noJSConfigInAssets = false
# useResourceCacheWhen = 'always' # useResourceCacheWhen = 'always'
writeStats = true writeStats = true
[build.buildStats]
enable = true
disableClasses = false
disableIDs = false
disableTags = false
[[build.cacheBusters]]
source = '(postcss|tailwind)\.config\.js'
target = '(css|styles|scss|sass)'


[outputs] [outputs]
home = [ "HTML" , "RSS" ] home = [ "HTML" , "RSS" ]
@ -141,20 +149,20 @@ enableEmoji = true
[caches] [caches]
[caches.assets] [caches.assets]
dir = ':resourceDir/_gen' dir = ':resourceDir/_gen'
maxAge = "5m" maxAge = -1
[caches.getcsv] [caches.getcsv]
dir = ':cacheDir/:project' dir = ':cacheDir/:project'
maxAge = "5m" maxAge = -1
[caches.getjson] [caches.getjson]
dir = ':cacheDir/:project' dir = ':cacheDir/:project'
maxAge = "5m" maxAge = -1
ttl = 300 ttl = 300
[caches.getresource] [caches.getresource]
dir = ':cacheDir/:project' dir = ':cacheDir/:project'
maxAge = "5m" maxAge = -1
[caches.images] [caches.images]
dir = ':resourceDir/_gen' dir = ':resourceDir/_gen'
maxAge ="5m" maxAge = -1
[caches.modules] [caches.modules]
dir = ':cacheDir/modules' dir = ':cacheDir/modules'
maxAge = "5m" maxAge = -1

Loading…
Cancel
Save