fix: absolute path for b64 images on 404 page

This commit is contained in:
Victor Westerlund 2024-04-06 20:49:21 +02:00
parent 140132fa72
commit e86baa1270

View file

@ -17,12 +17,8 @@ class Generator {
get dir () { return this._dir; },
set dir (newPath) {
const url = new URL(newPath);
url.pathname = this._dir_rel;
// Replace pathname of this file with relative path to assets
const path = url.pathname.split("/");
path[path.length - 1] = this._dir_rel;
url.pathname = path.join("/");
this._dir = url.toString();
}
}