Skip to content

Commit

Permalink
enableAplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Dec 20, 2024
1 parent a52381d commit 7d52f73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
{{- end -}}

{{- /* Music */ -}}
{{- if (.Scratch.Get "this").aplayer | or (.Scratch.Get "enableMusic") -}}
{{- if (.Scratch.Get "enableAplayer") | or (.Scratch.Get "enableMusic") -}}
{{- /* APlayer */ -}}
{{- $source := $cdn.aplayerCSS | default "lib/aplayer/APlayer.min.css" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/aplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{- $_ = replace $_ ",]" "]" -}}
<div class="aplayer-shortcode" {{- printf "data-audio='%s'" $_ | safeHTMLAttr -}} {{- printf "data-options='%s'" $options | safeHTMLAttr -}}></div>

{{- .Page.Scratch.SetInMap "this" "aplayer" true -}}
{{- .Page.Scratch.SetInMap "enableAplayer" true -}}

{{- else -}}
{{- errorf "Only named params is supported: %s" .Position -}}
Expand Down

0 comments on commit 7d52f73

Please sign in to comment.