Fix: use theme.html?layout= instead of layout.html if a local deploy is detected

This commit is contained in:
Pieter Vander Vennet 2023-05-04 23:38:32 +02:00
parent 441c4df4f6
commit db6760015f

View file

@ -49,7 +49,8 @@
} }
let linkPrefix = `${path}/${layout.id.toLowerCase()}.html?` let linkPrefix = `${path}/${layout.id.toLowerCase()}.html?`
if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { if (location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.port === "1234") {
// Redirect to 'theme.html?layout=* instead of 'layout.html'. This is probably a debug run, where the routing does not work
linkPrefix = `${path}/theme.html?layout=${layout.id}&` linkPrefix = `${path}/theme.html?layout=${layout.id}&`
} }