diff --git a/hooks/99_generatePdf.js b/hooks/99_generatePdf.js index cf418c785..b6c94d324 100644 --- a/hooks/99_generatePdf.js +++ b/hooks/99_generatePdf.js @@ -16,9 +16,10 @@ module.exports = { try { const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']}); const page = await browser.newPage(); - + const fullPath = path.resolve(targetDir, 'index.html'); + const fileUrl = `file:///${fullPath.replaceAll('\\', '/')}`; // Go to prepared page with documentation - await page.goto(`file://${path.join(targetDir, 'index.html')}`, { waitUntil: 'networkidle0' }); + await page.goto(fileUrl, { waitUntil: 'networkidle0' }); // Hide burger-menu in pdf await page.evaluate(() => { document.querySelector('.burger-menu').style.display = 'none'; }); diff --git a/scripts/transpile.js b/scripts/transpile.js index 371c72d79..332229070 100644 --- a/scripts/transpile.js +++ b/scripts/transpile.js @@ -9,7 +9,7 @@ async function transpileTemplate() { console.log("Output directory for transpiled files:", outputDir); await transpileFiles(templateContentDir, outputDir, { recursive: true }); } catch (error) { - console.log("Error during template transpilation:", err) + console.log("Error during template transpilation:", error) } }