mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-14 05:13:46 +02:00
fix: absolute path for b64 images on 404 page (#8)
This commit is contained in:
parent
efa84d9e6c
commit
397484c5b4
1 changed files with 2 additions and 6 deletions
|
@ -17,12 +17,8 @@ class Generator {
|
||||||
get dir () { return this._dir; },
|
get dir () { return this._dir; },
|
||||||
set dir (newPath) {
|
set dir (newPath) {
|
||||||
const url = new URL(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();
|
this._dir = url.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue