-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: 增加 spotify shortcode (hugo-fixit/FixIt#450)
- Loading branch information
Showing
5 changed files
with
113 additions
and
3 deletions.
There are no files selected for viewing
Binary file added
BIN
+15.6 KB
content/en/documentation/content-management/shortcodes/extended/spotify/featured-image.webp
Binary file not shown.
55 changes: 55 additions & 0 deletions
55
content/en/documentation/content-management/shortcodes/extended/spotify/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Extended Shortcode - spotify | ||
date: 2024-05-20T11:06:24+08:00 | ||
type: posts | ||
author: | ||
name: Lruihao | ||
link: https://lruihao.cn | ||
description: The spotify shortcode embeds a responsive music player for Spotify music. | ||
resources: | ||
- name: featured-image | ||
src: featured-image.webp | ||
tags: | ||
- Shortcodes | ||
- Content | ||
categories: | ||
- Documentation | ||
--- | ||
|
||
The `spotify` shortcode embeds a responsive music player for Spotify music. | ||
|
||
<!--more--> | ||
|
||
## Usages | ||
|
||
Example `spotify` input: | ||
|
||
```go-html-template | ||
{{</* spotify type=artist id=74ASZWbe4lXaubB36ztrGX */>}} | ||
Or | ||
{{</* spotify artist 74ASZWbe4lXaubB36ztrGX */>}} | ||
``` | ||
|
||
The rendered output looks like this: | ||
|
||
{{< spotify artist 74ASZWbe4lXaubB36ztrGX >}} | ||
|
||
## Options | ||
|
||
The `spotify` shortcode has the following named parameters: | ||
|
||
- **type** _[required]_ (**first** positional parameter) | ||
|
||
The `type` of the Spotify music, which can be `artist`, `album`, `track`, or `playlist`. | ||
|
||
- **id** _[required]_ (**second** positional parameter) | ||
|
||
The `id` of the Spotify music, which can be found in the Spotify URL. | ||
|
||
- **width** _[optional]_ (**third** positional parameter) | ||
|
||
The `width` of the Spotify music player. | ||
|
||
- **height** _[optional]_ (**fourth** positional parameter) | ||
|
||
The `height` of the Spotify music player. |
55 changes: 55 additions & 0 deletions
55
...ent/zh-cn/documentation/content-management/shortcodes/extended/spotify/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: 扩展 Shortcode - spotify | ||
date: 2024-05-20T11:06:24+08:00 | ||
type: posts | ||
author: | ||
name: Lruihao | ||
link: https://lruihao.cn | ||
description: spotify shortcode 提供了一个内嵌的响应式音乐播放器。 | ||
resources: | ||
- name: featured-image | ||
src: featured-image.webp | ||
tags: | ||
- Shortcodes | ||
- Content | ||
categories: | ||
- Documentation | ||
--- | ||
|
||
`spotify` shortcode 提供了一个内嵌的响应式音乐播放器。 | ||
|
||
<!--more--> | ||
|
||
## 快速使用 | ||
|
||
一个 `spotify` 示例: | ||
|
||
```go-html-template | ||
{{</* spotify type=artist id=74ASZWbe4lXaubB36ztrGX */>}} | ||
Or | ||
{{</* spotify artist 74ASZWbe4lXaubB36ztrGX */>}} | ||
``` | ||
|
||
呈现的输出效果如下: | ||
|
||
{{< spotify artist 74ASZWbe4lXaubB36ztrGX >}} | ||
|
||
## 详细参数 | ||
|
||
`spotify` shortcode 有以下命名参数: | ||
|
||
- **type** _[必需]_ (**第一个**位置参数) | ||
|
||
Spotify 音乐的 `type`,可以是 `艺术家`、`专辑`、`曲目` 或 `播放列表`。 | ||
|
||
- **id** _[必需]_ (**第二个**位置参数) | ||
|
||
Spotify 音乐的 `id`,可以在 Spotify URL 中找到。 | ||
|
||
- **width** _[optional]_ (**第三个**位置参数) | ||
|
||
Spotify 音乐播放器的宽度。 | ||
|
||
- **height** _[optional]_ (**第四个**位置参数) | ||
|
||
Spotify 音乐播放器的高度。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
github.com/Lruihao/hugo-shortcode-sponsor-log v1.0.0 h1:HN1tKv3xYVZRSz+xt2Wr3hLbqxi5yK6OZRecYj22yyU= | ||
github.com/Lruihao/hugo-shortcode-sponsor-log v1.0.0/go.mod h1:B0v1x6BWWp5g6w82hBfZkJNPTyTw8Cvt6ccZ7BllA20= | ||
github.com/hugo-fixit/FixIt v0.3.8-0.20240606030604-6eaae7470851 h1:5T1RJoZ3+f6Y1mtyNmCfnH3acpcgGbYrG8EwVU2nRGk= | ||
github.com/hugo-fixit/FixIt v0.3.8-0.20240606030604-6eaae7470851/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU= | ||
github.com/hugo-fixit/FixIt v0.3.8-0.20240608042704-678e2c0053c6 h1:OFmX9EfcudAUxIyD2ij8vAaSC3gN8LyO7OUm1SfA9lc= | ||
github.com/hugo-fixit/FixIt v0.3.8-0.20240608042704-678e2c0053c6/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU= | ||
github.com/hugo-fixit/component-projects v1.1.1 h1:iFwd/pWCSQ5LQoyb82Fsi21YP8Xrv4A5YDOYPXbpP/U= | ||
github.com/hugo-fixit/component-projects v1.1.1/go.mod h1:nXW0R37REwpfwUD1I4RtB5QW71vw66nRyB9uEpYxr+c= |