From 94b537707cc583de36518af18a22f6940b01df03 Mon Sep 17 00:00:00 2001 From: caesarsage Date: Sat, 13 Dec 2025 09:52:49 +0100 Subject: [PATCH 1/2] Add netlify.toml to enable deploy previews for PRs Signed-off-by: caesarsage --- netlify.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 netlify.toml 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" From 63ce6a90119e71ace928dcecc2a44b6e571b5db4 Mon Sep 17 00:00:00 2001 From: caesarsage Date: Wed, 21 Jan 2026 10:37:34 +0100 Subject: [PATCH 2/2] Add image shortcode for responsive images and increase Hugo build timeout Signed-off-by: caesarsage --- config/_default/hugo.toml | 5 ++++- layouts/shortcodes/image.html | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 layouts/shortcodes/image.html 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 }}