diff --git a/.eleventy.js b/.eleventy.js index 972756c..7809b7a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -20,16 +20,15 @@ function isFullUrl(url) { // Only one module.exports per configuration file, please! module.exports = function (eleventyConfig) { - eleventyConfig.addShortcode("image", async function (src, alt, sizes) { + eleventyConfig.addPassthroughCopy("content/albums/**/*.mp3"); + eleventyConfig.addShortcode("image", async function (src, alt, sizes) { let input; if(isFullUrl(src)) { input = src; } else { input = relativeToInputPath(this.page.inputPath, src); } - - console.log("SEARCH IMAGE IN", input); let metadata = await Image(input, { widths: [300, 600], diff --git a/_includes/albumslist.njk b/_includes/albumslist.njk index 0132aec..ef1f4a6 100644 --- a/_includes/albumslist.njk +++ b/_includes/albumslist.njk @@ -6,6 +6,12 @@

{{ album.data.title }}

{{ album.data.description }}

{% image album.data.cover, "photo of my tabby cat", "(min-width: 30em) 50vw, 100vw" %} +
+ {% for track in album.data.tracklist %} +
{{ track.title }}
+ + {% endfor %} +
{% endfor %} diff --git a/content/albums/cheburek/about.njk b/content/albums/cheburek/about.njk index bac2a1b..b517d6b 100644 --- a/content/albums/cheburek/about.njk +++ b/content/albums/cheburek/about.njk @@ -1,7 +1,16 @@ --- tags: - albums + title: Cheburek + description: In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available. + cover: ./albums/cheburek/cover.jpg + +tracklist: + - title: Track One + audio: ./albums/cheburek/tracklist/trackone.mp3 + - title: Track Two + audio: ./albums/cheburek/tracklist/tracktwo.mp3 --- diff --git a/content/albums/cheburek/tracklist/trackone.mp3 b/content/albums/cheburek/tracklist/trackone.mp3 new file mode 100644 index 0000000..63196d9 Binary files /dev/null and b/content/albums/cheburek/tracklist/trackone.mp3 differ diff --git a/content/albums/cheburek/tracklist/tracktwo.mp3 b/content/albums/cheburek/tracklist/tracktwo.mp3 new file mode 100644 index 0000000..c4f7b49 Binary files /dev/null and b/content/albums/cheburek/tracklist/tracktwo.mp3 differ