correct for windows slashes in redirect `precompile`

This commit is contained in:
Jeff McAffer 2020-10-08 19:20:27 -07:00 коммит произвёл GitHub
Родитель 7db4a3c85e
Коммит b1f1e1cb6a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -85,7 +85,7 @@ module.exports = async function precompileRedirects (pages) {
// add a veriation like `/free-pro-team@latest/v3/gists/comments`;
// again, we need to do this because all links in content get rewritten
if (!developerRoute.startsWith('/enterprise/')) {
const developerRouteWithVersion = path.join(nonEnterpriseDefaultVersion, developerRoute)
const developerRouteWithVersion = slash(path.join(nonEnterpriseDefaultVersion, developerRoute))
const developerRouteWithVersionAndLanguage = `/en/${developerRouteWithVersion}`
allRedirects[developerRouteWithVersion] = newPath
allRedirects[developerRouteWithVersionAndLanguage] = newPath