From a0a593ee108e1e5a4fe1aeeb752cd550fdee223b Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 27 Oct 2024 19:37:42 -0700 Subject: [PATCH] chore: remove unnecessary event; storage changes --- .eleventy.js | 4 +-- config/events/index.js | 44 -------------------------- package-lock.json | 26 +++++++-------- package.json | 6 ++-- src/includes/blocks/now-playing.liquid | 2 +- src/includes/nav/theme-toggle.liquid | 2 +- src/layouts/base.liquid | 6 +++- src/pages/page.html | 2 +- 8 files changed, 25 insertions(+), 67 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index a8fc3943..4d3c2e78 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -8,7 +8,7 @@ import markdownItFootnote from "markdown-it-footnote"; import markdownItPrism from "markdown-it-prism"; import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; import tablerIcons from "@cdransf/eleventy-plugin-tabler-icons"; -import { copyErrorPages, minifyJsComponents } from "./config/events/index.js"; +import { minifyJsComponents } from "./config/events/index.js"; import { albumReleasesCalendar } from "./config/collections/index.js"; import { cssConfig } from "./config/plugins/css-config.js"; @@ -73,8 +73,6 @@ export default async function (eleventyConfig) { eleventyConfig.addShortcode("appVersion", () => appVersion); // events - if (process.env.ELEVENTY_PRODUCTION) - eleventyConfig.on("afterBuild", copyErrorPages); if (process.env.ELEVENTY_PRODUCTION) eleventyConfig.on("afterBuild", minifyJsComponents); diff --git a/config/events/index.js b/config/events/index.js index ebc6ba10..21b3ccd1 100644 --- a/config/events/index.js +++ b/config/events/index.js @@ -2,50 +2,6 @@ import fs from "fs"; import path from "path"; import { minify } from "terser"; -const errorPages = [ - "404", - "500", - "1000", - "broken", - "error", - "js-challenge", - "not-allowed", - "rate-limit", -]; - -export const copyErrorPages = () => { - errorPages.forEach((errorPage) => { - const sourcePath = path.join("_site", errorPage, "index.html"); - const destinationPath = path.join("_site", `${errorPage}.html`); - const directoryPath = path.join("_site", errorPage); - - fs.copyFile(sourcePath, destinationPath, (err) => { - if (err) { - console.error(`Error copying ${errorPage} page:`, err); - return; - } - - fs.unlink(sourcePath, (unlinkErr) => { - if (unlinkErr) { - console.error( - `Error deleting source file for ${errorPage} page:`, - unlinkErr - ); - return; - } - - fs.rmdir(directoryPath, (rmdirErr) => { - if (rmdirErr) - console.error( - `Error removing directory for ${errorPage} page:`, - rmdirErr - ); - }); - }); - }); - }); -}; - export const minifyJsComponents = async () => { const scriptsDir = "_site/assets/scripts"; diff --git a/package-lock.json b/package-lock.json index e0f361bd..bd307626 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "coryd.dev", - "version": "2.2.1", + "version": "2.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "2.2.1", + "version": "2.3.0", "license": "MIT", "dependencies": { - "@cdransf/api-text": "^1.6.0", + "@cdransf/api-text": "^1.7.0", "@cdransf/select-pagination": "^1.3.1", - "@cdransf/theme-toggle": "^3.1.0", + "@cdransf/theme-toggle": "^3.2.0", "@daviddarnes/mastodon-post": "^1.3.0", "http-proxy-middleware": "3.0.3", "minisearch": "^7.1.0", @@ -372,9 +372,9 @@ } }, "node_modules/@cdransf/api-text": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@cdransf/api-text/-/api-text-1.6.0.tgz", - "integrity": "sha512-ezcPseEAGFixS86JmWt0Y5xUkhDfgFFVt5jOLV5b98hV26aBdgq3XQjbLWZsrBSGKeW0dTdBtK6BV/jgXnXo1w==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@cdransf/api-text/-/api-text-1.7.0.tgz", + "integrity": "sha512-7UIi0sqXOEm/9GB3STi2fPbmJmoVLCuuuTatll59v+BSj/Q6Sbtk8vVlYVh+ofWhqZVUxSMXugkb8W/qMR7PVQ==", "license": "MIT" }, "node_modules/@cdransf/eleventy-plugin-tabler-icons": { @@ -391,9 +391,9 @@ "license": "MIT" }, "node_modules/@cdransf/theme-toggle": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-3.1.0.tgz", - "integrity": "sha512-uNX0cVc9M9u7p5o8Kl1hGGDtS/6gvuoGgJCQ5NWW4AwV+/bASBLOPZnlr2MH8K5UhYgakYAkTld/ex3fxj/VGQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-3.2.0.tgz", + "integrity": "sha512-pr9tvk4PrFDaXjczYVTcXIIee+KJrLLzE0eumPG1v0RzmdYWue28XGmBvBndmr2dFRUurwcQUhdexSg7giHJrA==", "license": "MIT" }, "node_modules/@daviddarnes/mastodon-post": { @@ -1152,9 +1152,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001672", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001672.tgz", - "integrity": "sha512-XhW1vRo1ob6aeK2w3rTohwTPBLse/rvjq+s3RTSBwnlZqoFFjx9cHsShJjAIbLsLjyoacaTxpLZy9v3gg6zypw==", + "version": "1.0.30001673", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz", + "integrity": "sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index 87cb11e5..bcc2337a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "2.2.1", + "version": "2.3.0", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "engines": { @@ -26,9 +26,9 @@ "author": "Cory Dransfeldt", "license": "MIT", "dependencies": { - "@cdransf/api-text": "^1.6.0", + "@cdransf/api-text": "^1.7.0", "@cdransf/select-pagination": "^1.3.1", - "@cdransf/theme-toggle": "^3.1.0", + "@cdransf/theme-toggle": "^3.2.0", "@daviddarnes/mastodon-post": "^1.3.0", "http-proxy-middleware": "3.0.3", "minisearch": "^7.1.0", diff --git a/src/includes/blocks/now-playing.liquid b/src/includes/blocks/now-playing.liquid index 25410cd3..3430c9f4 100644 --- a/src/includes/blocks/now-playing.liquid +++ b/src/includes/blocks/now-playing.liquid @@ -1,5 +1,5 @@ - + {{ nowPlaying }}