Skip to content

feat(packages): support cli:omit markers for llm-only doc content#1466

Merged
decepulis merged 1 commit intomainfrom
feat/improve-installation-for-llms
Apr 24, 2026
Merged

feat(packages): support cli:omit markers for llm-only doc content#1466
decepulis merged 1 commit intomainfrom
feat/improve-installation-for-llms

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

@decepulis decepulis commented Apr 24, 2026

Summary

Adds a cli:omit marker pair so doc sections aimed only at LLM readers (served via llms.txt / .md URLs) can be stripped when the same doc is printed through @videojs/cli docs. The installation guide uses this to keep CLI-invocation instructions in the LLM-facing markdown without re-showing them when the user is already running the CLI.

Changes

  • New stripOmitMarkers util in @videojs/cli that removes <!-- cli:omit <id> -->...<!-- /cli:omit <id> --> blocks from rendered docs
  • handleDocs now strips omit markers for both the installation-replace path and regular docs
  • llms-markdown integration emits matching cli:omit comments around any element with data-cli-omit
  • Installation page switches the CLI-invocation blurb to data-cli-omit and moves the data-cli-replace="installation" wrapper around the actual install section

Testing

Covered by new unit tests in replace.test.ts (four cases: basic removal, no-markers passthrough, multiple blocks, multi-line content) and extended docs.test.ts assertions verifying the installation render drops both the markers and the omitted copy.


Note

Low Risk
Low risk: changes only affect documentation rendering in the CLI/LLM markdown pipeline, though the new regex-based stripping could remove unintended sections if markers are misused.

Overview
Adds support for <!-- cli:omit ... -->...<!-- /cli:omit ... --> blocks so LLM-only doc sections can be present in generated .md files but automatically removed when printing docs via @videojs/cli docs.

The site’s llms-markdown build step now emits cli:omit markers from data-cli-omit, and the installation guide restructures its content so the CLI-invocation blurb is omitted while the actual install section remains cli:replace-driven. Tests are updated/added to cover omit stripping and ensure CLI output no longer includes omit markers or their contents.

Reviewed by Cursor Bugbot for commit a30d1e0. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Apr 24, 2026 7:49pm

Request Review

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit a30d1e0
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69ebc94fc70c4b00089e2633
😎 Deploy Preview https://deploy-preview-1466--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 28.72 kB
/video (default + hls) 161.12 kB
/video (minimal) 26.25 kB
/video (minimal + hls) 158.87 kB
/audio (default) 26.64 kB
/audio (minimal) 24.21 kB
/background 4.16 kB
Media (8)
Entry Size
/media/background-video 1.04 kB
/media/container 1.72 kB
/media/dash-video 236.54 kB
/media/hls-video 134.01 kB
/media/mux-audio 160.06 kB
/media/mux-video 160.07 kB
/media/native-hls-video 3.77 kB
/media/simple-hls-video 15.80 kB
Players (3)
Entry Size
/video/player 7.04 kB
/audio/player 5.12 kB
/background/player 3.86 kB
Skins (29)
Entry Type Size
/video/minimal-skin.css css 3.50 kB
/video/skin.css css 3.53 kB
/video/minimal-skin js 26.26 kB
/video/minimal-skin.tailwind js 26.48 kB
/video/skin js 28.76 kB
/video/skin.tailwind js 28.88 kB
/audio/minimal-skin.css css 2.54 kB
/audio/skin.css css 2.50 kB
/audio/minimal-skin js 24.20 kB
/audio/minimal-skin.tailwind js 24.40 kB
/audio/skin js 26.64 kB
/audio/skin.tailwind js 26.78 kB
/background/skin.css css 117 B
/background/skin js 1.14 kB
/live-video/minimal-skin.css css 3.50 kB
/live-video/skin.css css 3.53 kB
/live-video/minimal-skin js 26.04 kB
/live-video/minimal-skin.tailwind js 26.07 kB
/live-video/skin js 28.45 kB
/live-video/skin.tailwind js 28.52 kB
/live-audio/minimal-skin.css css 2.54 kB
/live-audio/skin.css css 2.50 kB
/live-audio/minimal-skin js 23.99 kB
/live-audio/minimal-skin.tailwind js 23.99 kB
/live-audio/skin js 26.35 kB
/live-audio/skin.tailwind js 26.42 kB
/base.css css 157 B
/shared.css css 88 B
/skin-element js 1.36 kB
UI Components (25)
Entry Size
/ui/alert-dialog 1.00 kB
/ui/alert-dialog-close 467 B
/ui/alert-dialog-description 423 B
/ui/alert-dialog-title 420 B
/ui/buffering-indicator 2.50 kB
/ui/captions-button 2.67 kB
/ui/cast-button 2.66 kB
/ui/compounds 4.20 kB
/ui/controls 2.33 kB
/ui/error-dialog 3.07 kB
/ui/fullscreen-button 2.70 kB
/ui/hotkey 1.94 kB
/ui/mute-button 2.67 kB
/ui/pip-button 2.71 kB
/ui/play-button 2.68 kB
/ui/playback-rate-button 2.66 kB
/ui/popover 1.83 kB
/ui/poster 2.28 kB
/ui/seek-button 2.69 kB
/ui/slider 1.50 kB
/ui/thumbnail 2.92 kB
/ui/time 2.54 kB
/ui/time-slider 3.94 kB
/ui/tooltip 2.02 kB
/ui/volume-slider 2.66 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 23.48 kB
/video (default + hls) 154.91 kB
/video (minimal) 21.11 kB
/video (minimal + hls) 152.51 kB
/audio (default) 19.06 kB
/audio (minimal) 17.61 kB
/background 755 B
Media (7)
Entry Size
/media/background-video 575 B
/media/dash-video 235.04 kB
/media/hls-video 132.49 kB
/media/mux-audio 158.70 kB
/media/mux-video 158.57 kB
/media/native-hls-video 2.26 kB
/media/simple-hls-video 14.36 kB
Skins (26)
Entry Type Size
/video/minimal-skin.css css 3.44 kB
/video/skin.css css 3.46 kB
/video/minimal-skin js 21.04 kB
/video/minimal-skin.tailwind js 24.53 kB
/video/skin js 23.40 kB
/video/skin.tailwind js 24.66 kB
/audio/minimal-skin.css css 2.44 kB
/audio/skin.css css 2.39 kB
/audio/minimal-skin js 17.52 kB
/audio/minimal-skin.tailwind js 20.04 kB
/audio/skin js 18.98 kB
/audio/skin.tailwind js 19.97 kB
/background/skin.css css 90 B
/background/skin js 272 B
/live-video/minimal-skin.css css 3.44 kB
/live-video/skin.css css 3.46 kB
/live-video/minimal-skin js 17.74 kB
/live-video/minimal-skin.tailwind js 21.15 kB
/live-video/skin js 20.14 kB
/live-video/skin.tailwind js 21.32 kB
/live-audio/minimal-skin.css css 2.44 kB
/live-audio/skin.css css 2.39 kB
/live-audio/minimal-skin js 15.72 kB
/live-audio/minimal-skin.tailwind js 18.03 kB
/live-audio/skin js 17.21 kB
/live-audio/skin.tailwind js 18.12 kB
UI Components (20)
Entry Size
/ui/alert-dialog 1.09 kB
/ui/buffering-indicator 1.79 kB
/ui/captions-button 2.02 kB
/ui/cast-button 2.04 kB
/ui/controls 1.76 kB
/ui/error-dialog 2.25 kB
/ui/fullscreen-button 2.06 kB
/ui/mute-button 2.03 kB
/ui/pip-button 2.00 kB
/ui/play-button 1.99 kB
/ui/playback-rate-button 1.89 kB
/ui/popover 1.86 kB
/ui/poster 1.67 kB
/ui/seek-button 2.10 kB
/ui/slider 2.66 kB
/ui/thumbnail 2.07 kB
/ui/time 2.06 kB
/ui/time-slider 2.36 kB
/ui/tooltip 2.17 kB
/ui/volume-slider 3.18 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (9)
Entry Size
. 4.96 kB
/dom 11.87 kB
/dom/media/custom-media-element 1.90 kB
/dom/media/dash 234.13 kB
/dom/media/google-cast 4.07 kB
/dom/media/hls 131.85 kB
/dom/media/mux 158.10 kB
/dom/media/native-hls 1.61 kB
/dom/media/simple-hls 13.73 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 996 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.39 kB
/html 695 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.92 kB
/events 319 B
/function 327 B
/object 275 B
/predicate 265 B
/string 148 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (3)
Entry Size
. 40 B
/dom 13.33 kB
/playback-engine 13.24 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

@decepulis decepulis merged commit 85e28a5 into main Apr 24, 2026
26 checks passed
@decepulis decepulis deleted the feat/improve-installation-for-llms branch April 24, 2026 19:56
@luwes luwes mentioned this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant