Skip to content

chore: llms.txt updates#876

Merged
keenbeen32 merged 2 commits into
mainfrom
feat/llms-txt-case-studies-blog
Apr 22, 2026
Merged

chore: llms.txt updates#876
keenbeen32 merged 2 commits into
mainfrom
feat/llms-txt-case-studies-blog

Conversation

@Jordy-Baby
Copy link
Copy Markdown
Collaborator

@Jordy-Baby Jordy-Baby commented Apr 22, 2026

Summary

  • Plugin and config tweaks to the llms.txt generation pipeline.

Test plan

  • After deploy, verify llms.txt renders correctly on the live site.

Summary by CodeRabbit

  • Documentation
    • Updated site tagline to reflect HyperIndex, HyperSync, and HyperRPC documentation focus
    • Enabled the documentation site's blog feature
    • Added a Case Studies section with six featured posts (Polymarket, Sablier, Limitless, Bridgg, zkPass, GBlast)
    • Blog posts are now included in the generated documentation outputs

…ms.txt

- Extend plugin-generate-llms.js to scan the blog directory (opt-in via
  `blog: true` plugin option) and write stripped .md copies for every post.
  Mirrors existing docs behaviour: the ignored build step writes to
  build/blog/{slug}.md so LLM crawlers can fetch raw markdown per post.
- Add a Case Studies section to the llms.txt root text linking the six
  customer case studies as .md URLs with titles and descriptions, following
  the same bullet format as the existing docs sections.

Co-authored-by: claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

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

Project Deployment Actions Updated (UTC)
envio-docs Ready Ready Preview, Comment Apr 22, 2026 0:09am

Request Review

@Jordy-Baby Jordy-Baby requested a review from keenbeen32 April 22, 2026 10:30
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

📝 Walkthrough

Walkthrough

Updates Docusaurus config: replaces the site tagline with documentation-focused wording and enables the blog. Extends the llms generator plugin to discover, parse, and include blog posts (md/mdx) into generated llms.txt and related outputs.

Changes

Cohort / File(s) Summary
Docusaurus Configuration
docusaurus.config.js
Changed tagline to documentation wording and set presets[0][1].blog = true; added "## Case Studies" links into generated root/llms content.
LLM Generation Plugin
plugins/plugin-generate-llms.js
Added blog discovery and collection: resolves blog path, globs **/*.{md,mdx} (ignores authors/tags), parses frontmatter (title/description/slug), derives slug from filenames (handles YYYY-MM-DD-... and index folder posts), constructs pageUrl and appends entries to collectedDocs for llms output.

Sequence Diagram

sequenceDiagram
    participant FS as FileSystem
    participant Plugin as LLMs Generator Plugin
    participant Parser as gray-matter
    participant Site as Docusaurus Config
    participant Output as llms.txt Generator

    Site->>Plugin: Provide blog options (path, routeBasePath)
    Plugin->>FS: Resolve blog dir and glob **/*.{md,mdx}
    loop for each file
        Plugin->>FS: Read file content
        Plugin->>Parser: Parse frontmatter
        Parser-->>Plugin: title, description, slug
        Plugin->>Plugin: Derive slug if missing (date-prefix / index folder logic)
        Plugin->>Plugin: Build pageUrl using routeBasePath
        Plugin->>Plugin: Append entry to collectedDocs
    end
    Plugin->>Output: Include collectedDocs (docs + blogs) in llms.txt generation
    Output->>FS: Write llms*.txt and stripped markdown copies
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • nikbhintade
  • keenbeen32
  • moose-code

Poem

🐰 I hopped through folders, sniffed each post,

Titles and slugs I prized the most.
From frontmatter seeds to llms blooms bright,
Case studies gathered, tucked in tight.
Hooray — docs and blogs now take flight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'chore: llms.txt updates' is vague and does not accurately reflect the main changes. The PR primarily implements blog post scanning, markdown file generation, and case studies section—features that go beyond simple 'updates' and should be classified as 'feat', not 'chore'. Revise the title to reflect the primary feature: e.g., 'feat(llms): emit .md copies for blog posts and add case studies' or 'feat: add blog post scanning and case studies to llms.txt'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/llms-txt-case-studies-blog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
plugins/plugin-generate-llms.js (1)

165-170: Inconsistent filePath shape between docs and blog entries.

Docs push filePath: path.join(config.path, file) (repo-relative, line 109), while blog posts push filePath: fullPath (absolute). orderDocs matches includeOrder globs against filePath via minimatch, so any future includeOrder pattern intended to reach blog posts (e.g. blog/**) will silently fail to match on absolute paths. Current config doesn't use includeOrder for blog, so this is latent — worth aligning now to avoid a confusing debug later.

-                        collectedDocs.push({
-                            filePath: fullPath,
+                        collectedDocs.push({
+                            filePath: path.join(blogDir, file),
                             title,
                             description,
                             pageUrl,
                         });

Note writeMarkdownCopies reads via doc.filePath (line 224), so ensure the relative path resolves from the build CWD (it will, since Docusaurus runs with siteDir as cwd); otherwise store both filePath and absPath.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/plugin-generate-llms.js` around lines 165 - 170, The collectedDocs
entries use an absolute fullPath for filePath (in the collectedDocs.push block)
while docs use path.join(config.path, file) (repo-relative), causing
orderDocs/includeOrder minimatch checks to fail for blog entries; change the
blog collector to store repo-relative paths (e.g., use the same
path.join(config.path, ...) logic or compute a relative path from fullPath) so
that orderDocs, writeMarkdownCopies (which reads doc.filePath) and includeOrder
globs operate consistently; if you cannot reliably produce a repo-relative path,
store both filePath (relative) and absPath (absolute) on the doc object to
preserve existing read semantics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/plugin-generate-llms.js`:
- Around line 143-155: The slug fallback incorrectly uses the file basename
which yields "index" for folder-style posts; update the fallback in the block
that computes slug (where parsed.data.slug, file, path.basename, path.extname,
and the date-regex are used) so that if base === "index" you use the parent
directory name (path.basename(path.dirname(file))) instead of "index", then
apply the same /^\d{4}-\d{2}-\d{2}-(.+)$/ regex to strip the date prefix from
that parent-dir-derived base; keep the existing behavior when parsed.data.slug
is present or when no date prefix matches.

---

Nitpick comments:
In `@plugins/plugin-generate-llms.js`:
- Around line 165-170: The collectedDocs entries use an absolute fullPath for
filePath (in the collectedDocs.push block) while docs use path.join(config.path,
file) (repo-relative), causing orderDocs/includeOrder minimatch checks to fail
for blog entries; change the blog collector to store repo-relative paths (e.g.,
use the same path.join(config.path, ...) logic or compute a relative path from
fullPath) so that orderDocs, writeMarkdownCopies (which reads doc.filePath) and
includeOrder globs operate consistently; if you cannot reliably produce a
repo-relative path, store both filePath (relative) and absPath (absolute) on the
doc object to preserve existing read semantics.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d136e2ae-60ff-488a-8fbb-02dfd65acbce

📥 Commits

Reviewing files that changed from the base of the PR and between 11cced6 and be3e330.

📒 Files selected for processing (2)
  • docusaurus.config.js
  • plugins/plugin-generate-llms.js

Comment thread plugins/plugin-generate-llms.js
@Jordy-Baby Jordy-Baby enabled auto-merge (squash) April 22, 2026 12:04
Co-authored-by: claude <noreply@anthropic.com>
@Jordy-Baby Jordy-Baby changed the title feat(llms): emit .md copies for blog posts and add case studies to llms.txt chore: llms.txt updates Apr 22, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
plugins/plugin-generate-llms.js (2)

108-114: filePath shape is inconsistent between the docs and blog loops.

The docs loop pushes a repo-relative path (path.join(config.path, file) → e.g. "docs/foo.md"), while the blog loop pushes an absolute path (fullPath). Two downstream consequences:

  • orderDocs runs minimatch(doc.filePath, pattern). A user-supplied includeOrder pattern such as "**/*.md" or "**/case-study-*.md" would silently start matching blog posts once blog: true is enabled, pulling them into any llms-<name>.txt output — not just via the curated root text.
  • writeMarkdownCopies happens to work for both (relative paths resolve against CWD, absolute paths resolve directly), but this only holds as long as the build is invoked from the site root.

Normalizing both branches to the same representation (both relative to context.siteDir, or both absolute) removes the footgun.

♻️ Suggested normalization (blog loop)
-                        collectedDocs.push({
-                            filePath: fullPath,
+                        collectedDocs.push({
+                            filePath: path.join(blogDir, file),
                             title,
                             description,
                             pageUrl,
                         });

Also applies to: 173-178

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/plugin-generate-llms.js` around lines 108 - 114, The docs and blog
collection branches produce different filePath shapes (docs use
path.join(config.path, file) while the blog branch uses fullPath), causing
orderDocs (which runs minimatch(doc.filePath, pattern)) and writeMarkdownCopies
to behave inconsistently; update the blog loop to normalize filePath to the same
form as docs (e.g., make blog entries relative to context.siteDir or make docs
absolute) so collectedDocs entries are consistent, and ensure the change covers
the other occurrence noted (lines referenced around 173-178); keep
collectedDocs, path.join(config.path, file), fullPath, context.siteDir,
orderDocs, and writeMarkdownCopies in mind when making the fix.

120-171: Document or resolve the coupling between preset blog config and plugin options for future-proofing.

The preset's blog config (lines 249–256 in docusaurus.config.js) does not override path or routeBasePath, so both remain at Docusaurus defaults ("blog"). The plugin receives blog: true and defaults its blogDir and blogRouteBasePath to "blog" as well, so they match today. However, if the preset is later customized with a non-default path or routeBasePath without also updating the plugin's options.blog object, the plugin will:

  • Generate incorrect pageUrls pointing to the old route (broken links in llms.txt)
  • Emit stripped .md copies under the wrong directory, causing 404s when the site serves posts elsewhere

Either add a comment in the plugin header documenting this coupling (e.g., "plugin blog options must be kept in sync with preset blog config"), or resolve the effective preset blog config at runtime to avoid manual synchronization.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/plugin-generate-llms.js` around lines 120 - 171, The plugin currently
assumes defaults when options.blog === true (blogConfig, blogDir,
blogRouteBasePath) which can diverge from the preset and break generated pageUrl
and output locations; update the plugin so that when options.blog === true it
resolves the effective preset blog config at runtime (merge the preset's blog
path/routeBasePath into blogConfig before deriving blogDir/blogRouteBasePath) by
reading the site/preset config from context (e.g., inspect context.siteConfig or
context.presets) and falling back to the current defaults if nothing is found,
or alternatively add a clear header comment above the options.blog handling
stating "plugin blog options must be kept in sync with preset blog config" and
reference the symbols options.blog, blogConfig, blogDir, blogRouteBasePath, url,
and context.siteDir.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@plugins/plugin-generate-llms.js`:
- Around line 108-114: The docs and blog collection branches produce different
filePath shapes (docs use path.join(config.path, file) while the blog branch
uses fullPath), causing orderDocs (which runs minimatch(doc.filePath, pattern))
and writeMarkdownCopies to behave inconsistently; update the blog loop to
normalize filePath to the same form as docs (e.g., make blog entries relative to
context.siteDir or make docs absolute) so collectedDocs entries are consistent,
and ensure the change covers the other occurrence noted (lines referenced around
173-178); keep collectedDocs, path.join(config.path, file), fullPath,
context.siteDir, orderDocs, and writeMarkdownCopies in mind when making the fix.
- Around line 120-171: The plugin currently assumes defaults when options.blog
=== true (blogConfig, blogDir, blogRouteBasePath) which can diverge from the
preset and break generated pageUrl and output locations; update the plugin so
that when options.blog === true it resolves the effective preset blog config at
runtime (merge the preset's blog path/routeBasePath into blogConfig before
deriving blogDir/blogRouteBasePath) by reading the site/preset config from
context (e.g., inspect context.siteConfig or context.presets) and falling back
to the current defaults if nothing is found, or alternatively add a clear header
comment above the options.blog handling stating "plugin blog options must be
kept in sync with preset blog config" and reference the symbols options.blog,
blogConfig, blogDir, blogRouteBasePath, url, and context.siteDir.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1cc47944-f3ac-4cf0-8d58-d99acf97101a

📥 Commits

Reviewing files that changed from the base of the PR and between be3e330 and 5906a39.

📒 Files selected for processing (1)
  • plugins/plugin-generate-llms.js

@keenbeen32 keenbeen32 disabled auto-merge April 22, 2026 12:20
@keenbeen32 keenbeen32 merged commit c5d77a2 into main Apr 22, 2026
3 checks passed
@keenbeen32 keenbeen32 deleted the feat/llms-txt-case-studies-blog branch April 22, 2026 12:21
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.

2 participants