From d1f4e6fef5473c897c9e8357a0b8ccaf59810854 Mon Sep 17 00:00:00 2001 From: mx Date: Mon, 19 Jul 2021 19:55:59 +0200 Subject: [PATCH] added sorting to pages --- .eleventy.js | 62 ++++++++++++++++++++----------- _content/work/auto-archive.md | 2 +- _content/work/container2mvmnts.md | 3 +- _content/work/stone-throw.md | 2 +- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index e4fa68f..4f60596 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -2,28 +2,46 @@ module.exports = (config) => { // add collection for pages config.addCollection('pages', (collection) => { - return collection.getFilteredByGlob("**/*.md"); + let sorted = [] + let unsorted = [] + const pages = collection.getFilteredByGlob('**/*.md') + + for (let page of pages) { + if (page.data.sort) { + if (sorted[page.data.sort]) { + sorted.splice(page.data.sort) + } else { + sorted[page.data.sort] = page + } + } else { + unsorted.push(page) + } + } + + + + return sorted.concat(unsorted) }) - // custom filters - config.addFilter("makeLowercase", (value) => { - if (typeof value === 'string' || value instanceof String) { - return value.toLowerCase() - } - }) - - // added passthrough for global assets - config.addPassthroughCopy("assets") - // added passthrough for images in their respective folders - config.addPassthroughCopy("_content/**/images/**") - - // reutrn updated config - return { - dir: { - input: "_content", // content - includes: "../_includes", // templates - output: "_site", // rendered site - data: "../_data" // global data files - } +// custom filters +config.addFilter("makeLowercase", (value) => { + if (typeof value === 'string' || value instanceof String) { + return value.toLowerCase() } -} \ No newline at end of file +}) + +// added passthrough for global assets +config.addPassthroughCopy("assets") +// added passthrough for images in their respective folders +config.addPassthroughCopy("_content/**/images/**") + +// reutrn updated config +return { + dir: { + input: "_content", // content + includes: "../_includes", // templates + output: "_site", // rendered site + data: "../_data" // global data files + } +} +} diff --git a/_content/work/auto-archive.md b/_content/work/auto-archive.md index 4218431..77fb2c9 100644 --- a/_content/work/auto-archive.md +++ b/_content/work/auto-archive.md @@ -33,4 +33,4 @@ This project is still alive today, and has since manifested in a Master's projec ![](/work/images/autonomousArchive/aa17-web.jpg) ![](/work/images/autonomousArchive/aa19-web.jpg) ![](/work/images/autonomousArchive/aa20-web.jpg) -![](/work/images/autonomousArchive/aa4-web.jpg) \ No newline at end of file +![](/work/images/autonomousArchive/aa4-web.jpg) diff --git a/_content/work/container2mvmnts.md b/_content/work/container2mvmnts.md index e542658..00489ec 100644 --- a/_content/work/container2mvmnts.md +++ b/_content/work/container2mvmnts.md @@ -5,6 +5,7 @@ imgFeat: /work/images/container2mvmnts/DSC_7873.jpg gallery: - /work/images/container2mvmnts/DSC_7864.jpg - /work/images/container2mvmnts/DSC_7865.jpg +sort: 2 --- @@ -19,4 +20,4 @@ I have taken two devices synonymous with a long history of sound making, one as A record plays sound waves cut into grooves of vinyl that are read through a stylus into analogue audio. This record player appears to be functioning as expected, however the record is not playing audio data. The record contains digital data, used to synthesise audio through custom software. In place of the audio being a physical attribute of the record, the record player stands in as a speaker, resonating the analogue audio through its structure. The physicality of the audio interferes with the reading of the data on the record, causing it to skip, manifesting in errors or forcing the software to re-read the record. The modular synthesiser embodies a long history of generative music composition and performance. This device acts as intended. When knobs are turned, patch cables moved, a generative synthetic sound is emitted, ready to construct, record or perform a piece of music. However, the iteration in front of the manipulators and listeners is also a stage for live external performance as well as a tool for live mass distribution. Inside, a computer live streams audio in and out, anonymous performers are unseen workers overlooked as part of the synthesiser. The device's internal working are hidden discernible solely from its inputs and outputs. -In both instances it is important that the user unaware of what is happening inside the black box until they are inspired to seek further information. The distribution of this knowledge is done in the same way that open-source culture shares code and builds communities, accessible to all who are willing to break open the box (metaphorically). I want to encourage us to question the black boxes that we work with, so that we may stop being complicit and seek more transparent alternatives. The installation introduced this to an audience as they experience these systems through learning how the installation works. \ No newline at end of file +In both instances it is important that the user unaware of what is happening inside the black box until they are inspired to seek further information. The distribution of this knowledge is done in the same way that open-source culture shares code and builds communities, accessible to all who are willing to break open the box (metaphorically). I want to encourage us to question the black boxes that we work with, so that we may stop being complicit and seek more transparent alternatives. The installation introduced this to an audience as they experience these systems through learning how the installation works. diff --git a/_content/work/stone-throw.md b/_content/work/stone-throw.md index f29a5fa..c27f12c 100644 --- a/_content/work/stone-throw.md +++ b/_content/work/stone-throw.md @@ -2,7 +2,7 @@ title: stone throw layout: page.njk imgFeat: /work/images/stoneThrow/scanPage.png -gallery: +sort: 1 --- # stone throw