diff --git a/.eleventy.js b/.eleventy.js index 691d906131c615544cc6dbe8b30f8223a38a46bf..85aae7cd8864103d5321adae69902f50f5edda7e 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -6,82 +6,68 @@ const _moment = require("moment"); const _pluginRss = require("@11ty/eleventy-plugin-rss"); module.exports = function(eleventyConfig) { - eleventyConfig.setDataDeepMerge(true); - - eleventyConfig.addLayoutAlias("default", "layouts/default.liquid"); - eleventyConfig.addLayoutAlias("base", "layouts/base.liquid"); - eleventyConfig.addLayoutAlias("page", "layouts/page.liquid"); - eleventyConfig.addLayoutAlias("redirect", "layouts/redirect.liquid"); - - eleventyConfig.addPassthroughCopy("favicon.ico"); - eleventyConfig.addPassthroughCopy("resume.pdf"); - eleventyConfig.addPassthroughCopy({"assets/images": "images"}); - eleventyConfig.addPassthroughCopy({"assets/files": "files"}); - eleventyConfig.addPassthroughCopy({"assets/css": "css"}); - eleventyConfig.addPassthroughCopy({"assets/js": "js"}); - - const markdownItRenderer = new _markdown({ html: true }) - .use(require('markdown-it-prism'), { plugins: ["autoloader"] }) - .use(require("markdown-it-anchor")); - - eleventyConfig.addFilter("markdownify", function(str) { - if (typeof str === 'string') - return markdownItRenderer.render(str); - }); - - eleventyConfig.setLibrary("md", markdownItRenderer); - - eleventyConfig.addFilter("where", function(array, prop, value) { - return (array || []).filter((item) => item[prop] == value); - }); - - eleventyConfig.addFilter("dateUTC", function(date, format) { - return _moment.utc(date).format(format); - }); - - /*eleventyConfig.setBrowserSyncConfig({ - callbacks: { - ready: function(err, browserSync) { - const content_404 = _fs.readFileSync('_site/404.html'); - - browserSync.addMiddleware("*", (req, res) => { - // Provides the 404 content without redirect. - res.write(content_404); - res.end(); - }); - } - } - });*/ - - eleventyConfig.addFilter("starts_with", (string, test) => (string + "").startsWith(test)); - - eleventyConfig.addDataExtension("yaml", contents => _yaml.safeLoad(contents)); - - eleventyConfig.addPlugin(_pluginRss); - - return { - templateFormats: [ - "md", - "njk", - "html", - "liquid" - ], - - // If your site lives in a different subdirectory, change this. - // Leading or trailing slashes are all normalized away, so don’t worry about it. - // If you don’t have a subdirectory, use "" or "/" (they do the same thing) - // This is only used for URLs (it does not affect your file structure) - pathPrefix: "/", - - markdownTemplateEngine: "liquid", - htmlTemplateEngine: "liquid", - dataTemplateEngine: "liquid", - passthroughFileCopy: true, - dir: { - input: ".", - includes: "_includes", - data: "_data", - output: "_site" - } - }; + eleventyConfig.setDataDeepMerge(true); + + eleventyConfig.addLayoutAlias("default", "layouts/default.liquid"); + eleventyConfig.addLayoutAlias("base", "layouts/base.liquid"); + eleventyConfig.addLayoutAlias("page", "layouts/page.liquid"); + eleventyConfig.addLayoutAlias("redirect", "layouts/redirect.liquid"); + + eleventyConfig.addPassthroughCopy("favicon.ico"); + eleventyConfig.addPassthroughCopy("resume.pdf"); + eleventyConfig.addPassthroughCopy({"assets/images": "images"}); + eleventyConfig.addPassthroughCopy({"assets/files": "files"}); + eleventyConfig.addPassthroughCopy({"assets/css": "css"}); + eleventyConfig.addPassthroughCopy({"assets/js": "js"}); + + const markdownItRenderer = new _markdown({ html: true }) + .use(require('markdown-it-prism'), { plugins: ["autoloader"] }) + .use(require("markdown-it-anchor")); + + eleventyConfig.addFilter("markdownify", function(str) { + if (typeof str === 'string') + return markdownItRenderer.render(str); + }); + + eleventyConfig.setLibrary("md", markdownItRenderer); + + eleventyConfig.addFilter("where", function(array, prop, value) { + return (array || []).filter((item) => item[prop] == value); + }); + + eleventyConfig.addFilter("dateUTC", function(date, format) { + return _moment.utc(date).format(format); + }); + + eleventyConfig.addFilter("starts_with", (string, test) => (string + "").startsWith(test)); + + eleventyConfig.addDataExtension("yaml", contents => _yaml.safeLoad(contents)); + + eleventyConfig.addPlugin(_pluginRss); + + return { + templateFormats: [ + "md", + "njk", + "html", + "liquid" + ], + + // If your site lives in a different subdirectory, change this. + // Leading or trailing slashes are all normalized away, so don’t worry about it. + // If you don’t have a subdirectory, use "" or "/" (they do the same thing) + // This is only used for URLs (it does not affect your file structure) + pathPrefix: "/", + + markdownTemplateEngine: "liquid", + htmlTemplateEngine: "liquid", + dataTemplateEngine: "liquid", + passthroughFileCopy: true, + dir: { + input: ".", + includes: "_includes", + data: "_data", + output: "_site" + } + }; }; diff --git a/blog/2021-01-31-Audio-Automation.md b/blog/2021-01-31-Audio-Automation.md index 574e7f1ff073bfa25369959aa8583639f73a22f2..ed720bdf7fe33962285c007ee3bdba81cd72512e 100644 --- a/blog/2021-01-31-Audio-Automation.md +++ b/blog/2021-01-31-Audio-Automation.md @@ -19,7 +19,7 @@ Firstly, I had a distinct need to write this software in Kotlin. I am most comfo ## Using Kotlin Flows -In order to translate source events such as "a metronome tick" into a set of notes, I needed a way to construct the path of that data through my program. In Max/MSP, this path is visualized as a stream of events that gets transformed as it passes through different "objects" in its patcher interface. For my attempt to be effective, I would need a way to rapidly iterate upon this path in a similar fashion. +In order to translate source events such as "a metronome tick" into a set of notes, I needed a way to construct the path of that data through my program. In Max/MSP, this path is visualized as a stream of events that gets transformed as it passes through different "objects" in its patcher interface. For my attempt to be effective, I would need a way to rapidly iterate upon these paths in a similar fashion. ![The Max/MSP patcher interface, a handful of objects connected with spaghetti wires in-between.](/images/blogs/audio-maxmsp.png)