Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yuma-m committed Feb 1, 2021
0 parents commit 3ece9ec
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/introduction"]
path = themes/introduction
url = https://github.com/victoriadrake/hugo-theme-introduction.git
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# hugo-shortcodes-soundcloud

Hugo shortcodes to embed SoundCloud on your site.

## Shortcodes

### User widget

Copy [soundcloud-user.html](./layouts/shortcodes/soundcloud-user.html) into your `layouts/shortcode/` directory.

#### Usage

```markdown
{{< soundcloud-user UserID >}}
```

### Playlist widget

Copy [soundcloud-playlist.html](./layouts/shortcodes/soundcloud-playlist.html) into your `layouts/shortcode/` directory.

#### Usage

```markdown
{{< soundcloud-playlist PlaylistID >}}
```

## Note

You can confirm UserID and PlaylistID by [SoundCloud HTTP API](https://developers.soundcloud.com/docs/api/reference).
5 changes: 5 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
baseURL = "https://example.com/"
languageCode = "en-us"
title = "Hugo Shortcodes to embed SoundCloud"
theme = "introduction"
publishDir = "docs"
21 changes: 21 additions & 0 deletions content/home/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
+++
title = "SoundCloud Example"
+++

## User widget

```markdown
{{</* soundcloud-user UserID */>}}
```

{{< soundcloud-user 63874417 >}}

---

## Playlist widget

```markdown
{{</* soundcloud-playlist PlaylistID */>}}
```

{{< soundcloud-playlist 193869697 >}}
8 changes: 8 additions & 0 deletions layouts/shortcodes/soundcloud-playlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<iframe
width="100%"
height="300"
scrolling="no"
frameborder="no"
allow="autoplay"
src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/{{ index .Params 0 }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true">
</iframe>
8 changes: 8 additions & 0 deletions layouts/shortcodes/soundcloud-user.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<iframe
width="100%"
height="300"
scrolling="no"
frameborder="no"
allow="autoplay"
src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/users/{{ index .Params 0 }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true">
</iframe>
1 change: 1 addition & 0 deletions themes/introduction
Submodule introduction added at 7bebd0

0 comments on commit 3ece9ec

Please sign in to comment.