From 8e72b437f6535e230ed6993e7fc7bf1bb5743458 Mon Sep 17 00:00:00 2001 From: Ben Aultowski Date: Sun, 28 Dec 2025 12:41:08 -0500 Subject: [PATCH] Added Turbo.js for mix navigation --- eleventy.config.js | 3 ++- package-lock.json | 10 ++++++++++ package.json | 1 + src/_layouts/mix.njk | 6 +++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index a2c40ed..10d3128 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -140,7 +140,8 @@ export default async function (eleventyConfig) { 'src/assets/images/favicon/*': '/', // -- node_modules - 'node_modules/lite-youtube-embed/src/lite-yt-embed.{css,js}': `assets/components/` + 'node_modules/lite-youtube-embed/src/lite-yt-embed.{css,js}': `assets/components/`, + 'node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js': `assets/components/turbo.js` }); // ---------------------- ignore test files diff --git a/package-lock.json b/package-lock.json index bfec4d0..d5a6fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "@11ty/eleventy-plugin-webc": "^0.11.2", "@11ty/is-land": "^4.0.1", + "@hotwired/turbo": "^8.0.20", "lite-youtube-embed": "^0.3.4", "tailwindcss": "^3.4.17" }, @@ -1339,6 +1340,15 @@ "node": ">=18" } }, + "node_modules/@hotwired/turbo": { + "version": "8.0.20", + "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.20.tgz", + "integrity": "sha512-IilkH/+h92BRLeY/rMMR3MUh1gshIfdra/qZzp/Bl5FmiALD/6sQZK/ecxSbumeyOYiWr/JRI+Au1YQmkJGnoA==", + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, "node_modules/@img/colour": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", diff --git a/package.json b/package.json index 24a9c62..4b01239 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "@11ty/eleventy-plugin-webc": "^0.11.2", "@11ty/is-land": "^4.0.1", + "@hotwired/turbo": "^8.0.20", "lite-youtube-embed": "^0.3.4", "tailwindcss": "^3.4.17" }, diff --git a/src/_layouts/mix.njk b/src/_layouts/mix.njk index e650392..5be216c 100644 --- a/src/_layouts/mix.njk +++ b/src/_layouts/mix.njk @@ -9,7 +9,7 @@ layout: base {% set projectTracks = collections.tracksByProject[project] %} + +{% js "defer" %} + import * as Turbo from '/assets/components/turbo.js'; +{% endjs %}