Skip to content

Generate a llms-full version of the docs #3285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 8, 2025
Merged

Generate a llms-full version of the docs #3285

merged 13 commits into from
Jun 8, 2025

Conversation

SamyPesse
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Jun 7, 2025

🦋 Changeset detected

Latest commit: 0c0041e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook-v2 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

argos-ci bot commented Jun 7, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v1 (Inspect) ✅ No changes detected - Jun 8, 2025, 9:50 AM
customers-v2 (Inspect) ✅ No changes detected - Jun 8, 2025, 9:53 AM
default (Inspect) ✅ No changes detected - Jun 8, 2025, 9:54 AM
v2-cloudflare (Inspect) ✅ No changes detected - Jun 8, 2025, 9:54 AM
v2-vercel (Inspect) ✅ No changes detected - Jun 8, 2025, 9:55 AM

This reverts commit 3c05a65.
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new "llms-full.txt" endpoint that streams a full version of the documentation in Markdown format and updates related tests and utility functions.

  • Updated llms endpoint to deliver Markdown content
  • Added a new route (llms-full.ts) that streams Markdown, including parsing and link transformation
  • Added tests and updated dependencies to support new Markdown processing features

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/gitbook/src/routes/llms.ts Updated Content-Type header for the llms endpoint to serve Markdown
packages/gitbook/src/routes/llms-full.ts New route that streams a full Markdown version of the docs
packages/gitbook/src/lib/urls.ts Added utility functions for checking external URLs and anchors using updated URL API
packages/gitbook/package.json Updated package versions for Markdown and AST utilities
packages/gitbook/e2e/internal.spec.ts Added tests to verify the new llms and llms-full endpoints
packages/gitbook-v2/src/app/sites/static/[mode]/[siteURL]/[siteData]/llms-full.txt/route.ts New static route forwarding to the llms-full endpoint
.changeset/orange-hounds-sparkle.md Changeset file describing the new llms-full feature
Comments suppressed due to low confidence (3)

packages/gitbook/src/routes/llms.ts:49

  • Ensure that consuming clients expecting plain text are updated to handle Markdown content.
'Content-Type': 'text/markdown; charset=utf-8',

packages/gitbook/src/lib/urls.ts:16

  • Since URL.canParse is a new API method, consider adding a brief inline comment to clarify its behavior for future maintainers.
return URL.canParse(input);

packages/gitbook/src/routes/llms-full.ts:124

  • Confirm that the combination of basePath and siteSpace.path handles trailing slashes correctly to avoid malformed URLs.
joinPath(basePath, siteSpace.path)

@SamyPesse SamyPesse merged commit 33726c8 into main Jun 8, 2025
21 checks passed
@SamyPesse SamyPesse deleted the llms-full branch June 8, 2025 10:13
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