Repository: gohugoio/hugo (language: go)

Issue:
helpers: Add Chroma styles to docs.yaml
Although not needed today, this would allow us to (easily) host our own styles gallery.


Discussion / hints:

Fix patch:
diff --git a/docs/data/docs.yaml b/docs/data/docs.yaml
index dc61df0e861..6fc02c63acc 100644
--- a/docs/data/docs.yaml
+++ b/docs/data/docs.yaml
@@ -958,6 +958,73 @@ chroma:
   - Aliases:
     - zig
     Name: Zig
+  styles:
+  - abap
+  - algol
+  - algol_nu
+  - arduino
+  - autumn
+  - average
+  - base16-snazzy
+  - borland
+  - bw
+  - catppuccin-frappe
+  - catppuccin-latte
+  - catppuccin-macchiato
+  - catppuccin-mocha
+  - colorful
+  - doom-one
+  - doom-one2
+  - dracula
+  - emacs
+  - evergarden
+  - friendly
+  - fruity
+  - github
+  - github-dark
+  - gruvbox
+  - gruvbox-light
+  - hr_high_contrast
+  - hrdark
+  - igor
+  - lovelace
+  - manni
+  - modus-operandi
+  - modus-vivendi
+  - monokai
+  - monokailight
+  - murphy
+  - native
+  - nord
+  - nordic
+  - onedark
+  - onesenterprise
+  - paraiso-dark
+  - paraiso-light
+  - pastie
+  - perldoc
+  - pygments
+  - rainbow_dash
+  - rose-pine
+  - rose-pine-dawn
+  - rose-pine-moon
+  - rrt
+  - solarized-dark
+  - solarized-dark256
+  - solarized-light
+  - swapoff
+  - tango
+  - tokyonight-day
+  - tokyonight-moon
+  - tokyonight-night
+  - tokyonight-storm
+  - trac
+  - vim
+  - vs
+  - vulcan
+  - witchhazel
+  - xcode
+  - xcode-dark
 config:
   HTTPCache:
     cache:
@@ -1737,7 +1804,9 @@ config:
     headers: null
     redirects:
     - force: false
-      from: '**'
+      from: /**
+      fromHeaders: null
+      fromRe: ""
       status: 404
       to: /404.html
   services:
diff --git a/helpers/docshelper.go b/helpers/docshelper.go
index 35d07d366ff..5edbef11843 100644
--- a/helpers/docshelper.go
+++ b/helpers/docshelper.go
@@ -4,6 +4,7 @@ import (
 	"sort"
 
 	"github.com/alecthomas/chroma/v2/lexers"
+	"github.com/alecthomas/chroma/v2/styles"
 	"github.com/gohugoio/hugo/docshelper"
 )
 
@@ -30,7 +31,10 @@ func init() {
 
 		}
 
-		return docshelper.DocProvider{"chroma": map[string]any{"lexers": chromaLexers}}
+		return docshelper.DocProvider{"chroma": map[string]any{
+			"lexers": chromaLexers,
+			"styles": styles.Names(),
+		}}
 	}
 
 	docshelper.AddDocProviderFunc(docsProvider)


Test patch: