Closed Kindle-deep closed 5 months ago
spotify分享shortcode
{{- if .IsNamedParams -}} <iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}" width="{{ default "100%" (.Get "width") }}" height="{{ default "380" (.Get "height") }}" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe> {{- else -}} <iframe src="https://open.spotify.com/embed/{{ .Get 0 }}/{{ .Get 1 }}" width="{{ default "100%" (.Get 2) }}" height="{{ default "380" (.Get 3) }}" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe> {{- end -}}
type(必选项): album,trick,playlist,artist id(必选项):分享链接中获取 height:(非必选) weight:(非必选)
示例: {{< spotify type="artist" id="74ASZWbe4lXaubB36ztrGX" >}}
{{< spotify type="artist" id="74ASZWbe4lXaubB36ztrGX" >}}
sppported Extended Shortcode - Spotify
Describe the feature you want 描述你的功能需求
spotify分享shortcode
Useful reference 有价值的参考
{{- if .IsNamedParams -}} <iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}" width="{{ default "100%" (.Get "width") }}" height="{{ default "380" (.Get "height") }}" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe> {{- else -}} <iframe src="https://open.spotify.com/embed/{{ .Get 0 }}/{{ .Get 1 }}" width="{{ default "100%" (.Get 2) }}" height="{{ default "380" (.Get 3) }}" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe> {{- end -}}
示例:
{{< spotify type="artist" id="74ASZWbe4lXaubB36ztrGX" >}}