diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 19946d93..9e539b22 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -22,6 +22,9 @@ disqusShortname = "microcks-io" #hasCJKLanguage = true # If hasCJKLanguage true, auto-detect Chinese/Japanese/Korean Languages in the content. hasCJKLanguage = false +# Increase Hugo build timeout to prevent aborts during heavy image processing +timeout = "300s" + ############################# Modules ############################ [module] [[module.mounts]] @@ -61,7 +64,7 @@ home = ["HTML", "RSS", "JSON", "WebAppManifest"] # See https://github.com/disintegration/imaging # Default JPEG or WebP quality setting. Default is 75. quality = 90 -resampleFilter = "lanczos" +resampleFilter = "Lanczos" ############################# Caches ############################### [caches] diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html new file mode 100644 index 00000000..1e80c0cb --- /dev/null +++ b/layouts/shortcodes/image.html @@ -0,0 +1,27 @@ +{{- $src := .Get "src" -}} {{- $alt := .Get "alt" | default "" -}} {{- $width := +.Get "width" -}} {{- $height := .Get "height" -}} {{- $sizes := .Get "sizes" | +default "(max-width: 800px) 100vw, 800px" -}} {{- /* For real responsive images, +you would generate resized versions. Here, we use the same src for all for +simplicity. */ -}} {{- $srcset := printf "%s 400w, %s 800w, %s 1200w" $src $src +$src -}} +{{ $alt }} diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..0d72b3ed --- /dev/null +++ b/netlify.toml @@ -0,0 +1,17 @@ +[build] + publish = "public" + command = "npm run build" + +[context.deploy-preview] + command = "npm run build" + +[context.branch-deploy] + command = "npm run build" + +[context.production] + command = "npm run build" + +[context.production.environment] + HUGO_BASEURL = "https://microcks.io/" + HUGO_ENV = "production" + HUGO_ENABLEGITINFO = "true"