mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-13 21:13:40 +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; },
|
||||
set dir (newPath) {
|
||||
const url = new URL(newPath);
|
||||
|
||||
// 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("/");
|
||||
url.pathname = this._dir_rel;
|
||||
|
||||
this._dir = url.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue