Skip to content

Instantly share code, notes, and snippets.

@jnutterdev
Last active January 19, 2022 18:18
Show Gist options
  • Select an option

  • Save jnutterdev/d8977c086d7aed375287128de270e68f to your computer and use it in GitHub Desktop.

Select an option

Save jnutterdev/d8977c086d7aed375287128de270e68f to your computer and use it in GitHub Desktop.

Revisions

  1. jnutterdev revised this gist Jan 19, 2022. No changes.
  2. jnutterdev created this gist Jan 19, 2022.
    36 changes: 36 additions & 0 deletions bandcamp.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    <!--
    Bandcamp shortcode intended for Hugo. This will be placed in the layouts/shortcodes folder in your project.
    Parameters:
    type - (Required) `album` or `track`
    id - (Required) Target ID of track or album
    size - (Optional) size of player, `large` or `small`
    bgcol - (Optional) background color of player, `black` or `white`. default `white`.
    linkcol - (optional) link colors, default black. all color options:
    blue = 0687f5
    orange = e99708
    green = 2ebd35
    purple = 7137dc
    pink = f171a2
    lblue = 63b2cc
    red = de270f
    darkgrey = 333333
    tracklist - (optional) display tracks, default false
    artwork - (optional) size of artwork, large or small default small
    Example markdown code:
    {{< bandcamp id="3715311508" bgcol="000000" linkcol="63b2cc" size="large" tracklist="true" >}}
    -->

    <iframe style="border: 0; width: 100%; height: 120px;"
    src="https://bandcamp.com/EmbeddedPlayer
    /album={{ .Get "id" }}
    /size={{ default "small" (.Get "size") }}
    /bgcol={{ default "ffffff" (.Get "bgcol") }}
    /linkcol={{ default "000000" (.Get "linkcol") }}
    /tracklist={{ default "false" (.Get "tracklist") }}
    /artwork={{ default "small" (.Get "artwork") }}
    /transparent=true/"></iframe>