Skip to content

Commit

Permalink
feat(config-toggle): add the bootstrap.config_toggle.langs parameter
Browse files Browse the repository at this point in the history
Fixed #61
  • Loading branch information
razonyang committed Aug 28, 2023
1 parent b3f51cd commit a5aa525
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ path = "github.com/hugomods/icons/vendors/bootstrap"

[[module.imports]]
path = "github.com/hugomods/images"

[params.bootstrap.config_toggle]
langs = ["toml", "yaml", "json"]
2 changes: 1 addition & 1 deletion layouts/partials/bootstrap/config-toggle.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $filename := "" -}}
{{- $langs := slice "toml" "yaml" "json" }}
{{- $langs := default (slice "toml" "yaml" "json") site.Params.bootstrap.config_toggle.langs }}
{{- if .IsNamedParams }}
{{- with .Get "filename" }}{{ $filename = . }}{{ end }}
{{- with .Get "langs" }}{{ $langs = split . "," }}{{ end }}
Expand Down

0 comments on commit a5aa525

Please sign in to comment.