This page has moved to ${escapeAttr(newPath)}.
+`; + const rel = oldPath.replace(/^\//, '').replace(/\/$/, ''); + const dir = path.join(outDir, rel); + if (!fs.existsSync(path.join(dir, 'index.html'))) { + fs.mkdirSync(dir, { recursive: true }); + fs.writeFileSync(path.join(dir, 'index.html'), stub); + } + } + console.log(`Wrote ${Object.keys(redirects).length} redirect stubs`); + } + + // 404 + sitemap + fs.writeFileSync(path.join(outDir, '404.html'), render404({ tree, siteUrl: SITE_URL })); + const sitemap = `\n${escapeHtml(token.content)}`;
+ const langLabel = lang && lang !== 'txt' ? lang : '';
+ return `We couldn't find what you were looking for. Try the search in the sidebar, or head back to the documentation home.
+