docs: Apparently some web servers don't like % characters in filepaths. Wierd!

This commit is contained in:
Starbeamrainbowlabs 2021-10-17 03:04:50 +01:00
parent 6eaa3799d3
commit 2aa15116e2
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -62,7 +62,8 @@ async function srcset(source_image, target_dir, urlpath, format = "__AUTO__", si
debug(`SOURCE_SIZE`, source_size, `TARGET_FORMAT`, target_format); debug(`SOURCE_SIZE`, source_size, `TARGET_FORMAT`, target_format);
let setitems = await Promise.all(sizes.map(async (size) => { let setitems = await Promise.all(sizes.map(async (size) => {
let target_filename = `${source_parsed.name}_${size}.${target_format}`; let target_filename = `${source_parsed.name}_${size}.${target_format}`
.replace(/%/, "pcent");
let target_current = path.join( let target_current = path.join(
target_dir, target_dir,
target_filename target_filename