Skip to content

feat(site): split llms.txt into per-framework and blog sub-indexes#697

Merged
decepulis merged 1 commit intomainfrom
feat/llms-txt-sub-indexes
Mar 3, 2026
Merged

feat(site): split llms.txt into per-framework and blog sub-indexes#697
decepulis merged 1 commit intomainfrom
feat/llms-txt-sub-indexes

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

@decepulis decepulis commented Mar 3, 2026

Closes #695

Summary

Split the monolithic llms.txt index into a hierarchical structure so LLMs can fetch only framework-relevant documentation instead of the entire site catalog.

Changes

  • Root llms.txt now links to per-framework sub-indexes (/docs/framework/{fw}/llms.txt) and a blog sub-index (/blog/llms.txt) instead of listing every page
  • Per-framework docs sub-indexes group pages by their data-framework attribute
  • Blog gets its own sub-index with newest-first ordering preserved
  • Sub-index URLs added to sitemap customPages
  • Extracted PageEntry interface to replace repeated inline type annotations
Implementation details

The single generateLlmsTxt() function was replaced by three focused generators:

  • generateRootIndex() — links to sub-indexes and lists other pages
  • generateDocsIndex() — framework-specific docs listing
  • generateBlogIndex() — blog posts sorted newest-first

Framework is determined by the existing data-framework attribute already set on docs pages.

Testing

pnpm build:site — verify the generated llms.txt, blog/llms.txt, and docs/framework/{html,react}/llms.txt files in dist/

Break the monolithic llms.txt into a hierarchical structure with a root
index linking to per-framework docs sub-indexes and a blog sub-index.
This lets LLMs fetch only the framework-relevant docs instead of the
entire site catalog.
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 3, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 5e32914
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69a76b7e9119380008044059
😎 Deploy Preview https://deploy-preview-697--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

github-actions bot commented Mar 3, 2026

📦 Bundle Size Report

Package Size Diff %
@videojs/core 10.28 kB 0 B ░░░░░░░░ 0%
@videojs/element 1.60 kB 0 B ░░░░░░░░ 0%
@videojs/html 18.36 kB 0 B ░░░░░░░░ 0%
@videojs/icons 3.79 kB 0 B ░░░░░░░░ 0%
@videojs/react 14.96 kB 0 B ░░░░░░░░ 0%
@videojs/store 1.95 kB 0 B ░░░░░░░░ 0%
@videojs/utils 2.81 kB 0 B ░░░░░░░░ 0%

Total: 53.75 kB · 0 B · 0%


Entry Breakdown

Subpath sizes are the additional bytes on top of the root entry point, measured by bundling root + subpath together and subtracting the root-only size.

@videojs/core
Entry Base PR Diff %
. 4.28 kB 4.28 kB 0 B 0%
./dom 6.01 kB 6.01 kB 0 B 0%
total 10.28 kB 10.28 kB 0 B 0%
@videojs/element
Entry Base PR Diff %
. 817 B 817 B 0 B 0%
./context 823 B 823 B 0 B 0%
total 1.60 kB 1.60 kB 0 B 0%
@videojs/html
Entry Base PR Diff %
. 15.20 kB 15.20 kB 0 B 0%
./video 1.06 kB 1.06 kB 0 B 0%
./audio 1.06 kB 1.06 kB 0 B 0%
./background 1.05 kB 1.05 kB 0 B 0%
total 18.36 kB 18.36 kB 0 B 0%
@videojs/icons
Entry Base PR Diff %
./react 2.27 kB 2.27 kB 0 B 0%
./html 1.52 kB 1.52 kB 0 B 0%
total 3.79 kB 3.79 kB 0 B 0%
@videojs/store
Entry Base PR Diff %
. 1.29 kB 1.29 kB 0 B 0%
./html 468 B 468 B 0 B 0%
./react 204 B 204 B 0 B 0%
total 1.95 kB 1.95 kB 0 B 0%
@videojs/utils
Entry Base PR Diff %
./array 104 B 104 B 0 B 0%
./dom 928 B 928 B 0 B 0%
./events 227 B 227 B 0 B 0%
./function 261 B 261 B 0 B 0%
./object 119 B 119 B 0 B 0%
./predicate 265 B 265 B 0 B 0%
./string 148 B 148 B 0 B 0%
./style 185 B 185 B 0 B 0%
./time 478 B 478 B 0 B 0%
./number 158 B 158 B 0 B 0%
total 2.81 kB 2.81 kB 0 B 0%

ℹ️ How to interpret

Sizes are minified + brotli, measured with esbuild.
Package totals are computed as root size + marginal subpath costs.
Subpath marginal cost = (root + subpath bundled together) − root alone.

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

Run pnpm size locally to check current sizes.

@decepulis decepulis merged commit 916f470 into main Mar 3, 2026
19 checks passed
@decepulis decepulis deleted the feat/llms-txt-sub-indexes branch March 3, 2026 23:18
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.

llms.txt improvements

1 participant