GitbookIO / GitbookIO/gitbook

New content not reflected immediately in the `/llms.txt` or `llms-full.txt`

Open Beginner friendly
#3,882 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
29k
Forks
4k
Avg merge
1d 2h
Merged PRs (30d)
71

Description

Bug description

We are using the GitBook SaaS platform and when we add a new page via the GitBook UI we notice that new content is not reflected in either /llms.txt and /llms-full.txt. We these endpoints to be dynamic (not static or cached) and reflect the content as it updated. This is really important for our customer facing support features.

How to reproduce

  1. Add a new page
  2. Check /llms.txt
  3. You will notice the new page is not referenced in llms.txt

Additional context

Relevant code - https://github.com/GitbookIO/gitbook/blob/main/packages/gitbook/src/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/llms.txt/route.ts

Notice the export const dynamic = 'force-static';

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/llms.txt/route.ts, especially its force-static setting and how site content is loaded. Reproduce the issue by adding a page in GitBook and checking both /llms.txt and /llms-full.txt. Done means newly added content appears in both endpoints without waiting for stale output.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.