From f82c03682a2a317d72749ce026c717102e81d226 Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:49:47 +0200 Subject: [PATCH] chore: link new puppeteer versions (#8637) --- docs/index.md | 2 ++ utils/generate_docs.ts | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 57694b4db25cb..9a697d9d1fd53 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,7 @@ --- + sidebar_position: 1 + --- # Puppeteer diff --git a/utils/generate_docs.ts b/utils/generate_docs.ts index 71dbf88ce7683..425269f308894 100644 --- a/utils/generate_docs.ts +++ b/utils/generate_docs.ts @@ -55,11 +55,11 @@ chdir(join(__dirname, '..')); { const content = readFileSync('README.md', 'utf-8'); const sectionContent = ` ---- -sidebar_position: 1 ---- - -`; + --- + sidebar_position: 1 + --- + + `; writeFileSync('docs/index.md', sectionContent + content); } @@ -78,6 +78,12 @@ sidebar_position: 1 buffer.push( ` * Chromium ${chromiumVersion} - [Puppeteer ${puppeteerVersion}](https://github.com/puppeteer/puppeteer/blob/${puppeteerVersion}/docs/api.md)` ); + } else if (semver.gte(puppeteerVersion, '15.3.0')) { + buffer.push( + ` * Chromium ${chromiumVersion} - [Puppeteer ${puppeteerVersion}](https://pptr.dev/${puppeteerVersion.slice( + 1 + )})` + ); } else { buffer.push( ` * Chromium ${chromiumVersion} - Puppeteer ${puppeteerVersion}`