diff --git a/assets/blog/README.md b/assets/blog/README.md deleted file mode 100644 index f5dad1fd9..000000000 --- a/assets/blog/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## No images here - -Don't put images or other assets directly in this directory! Always make a new directory per-post, like those above, to store assets. - -The directory doesn't have to use the same slug as your post. Just pick something that doesn't exist yet, and use it. - -Thank you for doing your part in keeping a Clean Blog For All. diff --git a/config/buildAssets.js b/config/buildAssets.js index 05b5c8cfb..ed3ce20e7 100644 --- a/config/buildAssets.js +++ b/config/buildAssets.js @@ -45,6 +45,9 @@ async function createAssetPaths() { file.indexOf(publicDir) + publicDir.length, ); const hashedAt = name.lastIndexOf('-'); + if (hashedAt === -1) { + throw new Error(`hashedAt is -1, which is an error likely caused by a stray file (${file}) being pulled into the assets build path`) + } const originalName = name.slice(0, hashedAt); const key = `${originalName}${ext}`; return {