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
This commit is contained in:
parent
140132fa72
commit
e86baa1270
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);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue