{{- if not (.Page.Store.Get "asciinema") -}} {{- /* Include asciinema player only first time */ -}} {{- /* remove whitespaces */ -}} {{- /* remove whitespaces */ -}} {{- .Page.Store.Set "asciinema" true -}} {{- end -}} {{- $href := (partial "docs/links/portable-image" (dict "Page" .Page "Destination" (.Get "cast"))) -}} {{- .Store.Set "asciinema" .Params -}} {{- .Store.DeleteInMap "asciinema" "cast" -}} {{- $attributes := partial "docs/text/mapper" (dict "attributes" (dict) "set" (dict "id" (printf "asciinema-%d" .Ordinal) "x-data-cast" $href "x-data-opts" (.Store.Get "asciinema" | jsonify) ) "merge" (dict "class" (slice "asciinema" "book-asciinema") ) ) -}}