From bb6f992115c44e5536620ffe7a2b548c11cbd786 Mon Sep 17 00:00:00 2001 From: Nick Trogh Date: Wed, 2 Sep 2026 11:25:44 +0200 Subject: [PATCH 1/3] Add script to migrate embedded YouTube videos to linked thumbnails --- .../instructions/docs-writing.instructions.md | 4 +- build/replace-youtube-embeds.js | 606 ++++++++++++++++++ build/replace-youtube-embeds.test.js | 159 +++++ package.json | 2 + 4 files changed, 770 insertions(+), 1 deletion(-) create mode 100644 build/replace-youtube-embeds.js create mode 100644 build/replace-youtube-embeds.test.js diff --git a/.github/instructions/docs-writing.instructions.md b/.github/instructions/docs-writing.instructions.md index 9dd6348bb5..d9cb5b984d 100644 --- a/.github/instructions/docs-writing.instructions.md +++ b/.github/instructions/docs-writing.instructions.md @@ -118,7 +118,9 @@ Use the agreed framing to guide the plan, scope, structure, terminology, prerequ * Use videos only when they add value. * Videos have a descriptive and meaningful title that starts with "Video showing" or "Video of" and ends with ".". -* For embedded videos, you MUST use `youtube-nocookie.com` instead of `youtube.com`. +* Do not embed YouTube videos with an `iframe`. Use linked-image Markdown with a locally stored thumbnail. The site automatically opens external Markdown links in a new tab. +* The thumbnail alt text is the link's accessible name. It must identify the video and announce that the link opens in a new tab, for example `[![Watch