From e11968338340b86cce616762b1596da88c5e93a5 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Mon, 19 Sep 2022 12:37:35 +0200 Subject: [PATCH 1/4] config/security: Allow proxy variables in subcommands In particular for go get --- data/docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/docs.json b/data/docs.json index fe4efeb22..b41cb351d 100644 --- a/data/docs.json +++ b/data/docs.json @@ -1650,7 +1650,7 @@ "^postcss$" ], "osEnv": [ - "(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$" + "(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM)$" ] }, "funcs": { From af4a823b14733d348fe4ec299d2f56bd7f8331c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 21 Sep 2022 16:24:54 +0200 Subject: [PATCH 2/4] resources/images: Add $image.Colors Which returns the most dominant colors of an image using a simple histogram method. Fixes #10307 --- .../en/content-management/image-processing/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index f2748f5db..d99ea7846 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -163,6 +163,19 @@ Sometimes it can be useful to create the filter chain once and then reuse it. {{ $image2 := $image2.Filter $filters }} ``` +### Colors + +{{< new-in "0.104.0" >}} + +`.Colors` returns a slice of hex string with the dominant colors in the image using a simple histogram method. + +```go-html-template +{{ $colors := $image.Colors }} +``` + +This method is fast, but if you also scale down your images, it would be good for performance to extract the colors from the scaled down image. + + ### Exif Provides an [Exif] object containing image metadata. From ae48b5901f1c9ecc60b7b872e6bf462dc5e66b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 22 Sep 2022 17:57:13 +0200 Subject: [PATCH 3/4] docs: Regenerate CLI docs --- content/en/commands/hugo_completion_bash.md | 2 +- content/en/commands/hugo_completion_zsh.md | 6 +++++- content/en/commands/hugo_new.md | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/content/en/commands/hugo_completion_bash.md b/content/en/commands/hugo_completion_bash.md index ccdd979ae..d77093456 100644 --- a/content/en/commands/hugo_completion_bash.md +++ b/content/en/commands/hugo_completion_bash.md @@ -26,7 +26,7 @@ To load completions for every new session, execute once: #### macOS: - hugo completion bash > /usr/local/etc/bash_completion.d/hugo + hugo completion bash > $(brew --prefix)/etc/bash_completion.d/hugo You will need to start a new shell for this setup to take effect. diff --git a/content/en/commands/hugo_completion_zsh.md b/content/en/commands/hugo_completion_zsh.md index 7dfeab233..7e4e15ac9 100644 --- a/content/en/commands/hugo_completion_zsh.md +++ b/content/en/commands/hugo_completion_zsh.md @@ -16,6 +16,10 @@ to enable it. You can execute the following once: echo "autoload -U compinit; compinit" >> ~/.zshrc +To load completions in your current shell session: + + source <(hugo completion zsh); compdef _hugo hugo + To load completions for every new session, execute once: #### Linux: @@ -24,7 +28,7 @@ To load completions for every new session, execute once: #### macOS: - hugo completion zsh > /usr/local/share/zsh/site-functions/_hugo + hugo completion zsh > $(brew --prefix)/share/zsh/site-functions/_hugo You will need to start a new shell for this setup to take effect. diff --git a/content/en/commands/hugo_new.md b/content/en/commands/hugo_new.md index d294b65b3..5d044b60b 100644 --- a/content/en/commands/hugo_new.md +++ b/content/en/commands/hugo_new.md @@ -36,6 +36,7 @@ hugo new [path] [flags] --disableKinds strings disable different kind of pages (home, RSS etc.) --editor string edit new content with this editor, if provided --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages + -f, --force overwrite file if it already exists --forceSyncStatic copy all files when static is changed. --gc enable to run some cleanup tasks (remove unused cache files) after the build -h, --help help for new From da775a36d2e9cef14138bb209ebf074e74172387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 22 Sep 2022 18:55:00 +0200 Subject: [PATCH 4/4] docs: Regen docs helper --- data/docs.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/data/docs.json b/data/docs.json index b41cb351d..8eda8d3b2 100644 --- a/data/docs.json +++ b/data/docs.json @@ -244,6 +244,13 @@ "chaiscript" ] }, + { + "Name": "Chapel", + "Aliases": [ + "chapel", + "chpl" + ] + }, { "Name": "Cheetah", "Aliases": [ @@ -347,6 +354,13 @@ "jinja" ] }, + { + "Name": "dns", + "Aliases": [ + "zone", + "bind" + ] + }, { "Name": "Docker", "Aliases": [ @@ -437,7 +451,8 @@ { "Name": "Fortran", "Aliases": [ - "fortran" + "fortran", + "f90" ] }, { @@ -1004,6 +1019,12 @@ "promql" ] }, + { + "Name": "properties", + "Aliases": [ + "java-properties" + ] + }, { "Name": "Protocol Buffer", "Aliases": [