Skip to content

Commit

Permalink
feat: add the search.sass_transpiler parameter, default to dartsass
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Aug 22, 2024
1 parent b41920d commit 25c6f06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions exampleSite/layouts/partials/assets/css-resource.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ $css := resources.Get "main.scss" | toCSS (dict
"transpiler" (default "dartsass" site.Params.search.sass_transpiler)
"enableSourceMap" (not hugo.IsProduction)
"outputStyle" (cond hugo.IsProduction "compressed" "expanded") )
}}
Expand Down
1 change: 1 addition & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ path = "github.com/hugomods/icons/vendors/bootstrap"
[params.hugopress.modules.search.hooks.body-end]

[params.search]
sass_transpiler = "dartsass"
modal_container = "body"
modal_toggle_selector = '.search-modal-toggle'
stall_threshold = 300
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/search/assets/css-resource.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
}}
{{- $css := resources.Get "search/scss/index.scss" }}
{{- $options := dict
"transpiler" (default "dartsass" site.Params.search.sass_transpiler)
"targetPath" (cond $rtl "css/search.rtl.css" "css/search.css")
"enableSourceMap" (not hugo.IsProduction)
"outputStyle" (cond hugo.IsProduction "compressed" "expanded")
Expand Down

0 comments on commit 25c6f06

Please sign in to comment.