helpers: Add Chroma styles to docs.yaml

Closes #13360
This commit is contained in:
Joe Mooring
2025-02-07 11:06:29 -08:00
committed by Bjørn Erik Pedersen
parent a352e69b02
commit f0c1852978
2 changed files with 75 additions and 2 deletions

View File

@@ -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)