We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请求增加spotify短代码,方法如下:
在 layouts/shortcodes/ 增加 spotify.html:
layouts/shortcodes/
spotify.html
<!-- Parameters: type - (Required) album / track / playlist / artist id - (Required) Target ID width - (Optional) width height - (Optional) height --> {{ 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 }}
Useage: type:必填,可以是 album(专辑),trace(单曲), playlist (歌单), artist (歌手) id: 必填, 专辑/单曲/歌单/歌手的目标ID,通过分享可得 width: 宽度 height: 高度
{{< spotify type="album" id="5vqILcEeCT0N1DeJBsLrGE" width="100%" height="250" >}}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
请求增加spotify短代码,方法如下:
在
layouts/shortcodes/
增加spotify.html
:Useage:
type:必填,可以是 album(专辑),trace(单曲), playlist (歌单), artist (歌手)
id: 必填, 专辑/单曲/歌单/歌手的目标ID,通过分享可得
width: 宽度
height: 高度
The text was updated successfully, but these errors were encountered: