mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Redirect dev pages
This commit is contained in:
@@ -337,8 +337,14 @@ Promise.all([
|
||||
if (!target.endsWith('/')) {
|
||||
target = `${target}/`
|
||||
}
|
||||
|
||||
if (target.startsWith('/dev/')) {
|
||||
reload(target.slice(4))
|
||||
return
|
||||
}
|
||||
|
||||
if (track) {
|
||||
ga('set', 'page', target.replace(/^\/dev/, ''))
|
||||
ga('set', 'page', target)
|
||||
ga('send', 'pageview');
|
||||
history.pushState(target, 'Change Page', target)
|
||||
}
|
||||
|
||||
@@ -40,6 +40,11 @@ module.exports = (env, argv) => ({
|
||||
filename: 'index.html',
|
||||
template: 'src/index.html'
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Data Pack Generators Minecraft',
|
||||
filename: '404.html',
|
||||
template: 'src/index.html'
|
||||
}),
|
||||
...config.models.flatMap(buildModel)
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user