Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

Implements opt-in generation of llms.txt - a single-file export combining all markdown content in navigation order for LLM consumption.

Changes

Type system

  • Added llms?: boolean to HyperbookJson config schema

Build process

  • Generates llms.txt when enabled, with format: <SYSTEM>BookName - Version X.X.X</SYSTEM> header followed by all page content
  • Respects navigation ordering (index property), automatically excludes hide: true pages/sections
  • Optimized to load all files once instead of per-page

Documentation

  • Updated English and German config docs with llms property description

Example

{
  "name": "My Documentation",
  "llms": true
}

Produces llms.txt:

<SYSTEM>My Documentation - Version 0.62.0</SYSTEM>

# Chapter 1
Content here...

# Chapter 2
Content here...
Original prompt

Generate a llms.txt file when the key "llms" is true. in the hyperbook config.

The file you basicly combine all markdown files in this file. The title of the file should be the name of the hyperbook and its version.

hyperbook name - Version 0.0.0

Also make sure that everything has the same order as in the hyperbook. Also ignore pages and sections with hide: true.

Also update the documentation and add a changeset


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Nov 4, 2025

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

Project Deployment Preview Comments Updated (UTC)
hyperbook-4fwa Ready Ready Preview Comment Nov 4, 2025 10:28pm

Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
…system operations

Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Copilot AI changed the title [WIP] Add llms.txt file generation for hyperbook Add llms.txt generation for LLM-optimized documentation export Nov 4, 2025
Copilot AI requested a review from mikebarkmin November 4, 2025 22:05
@mikebarkmin mikebarkmin marked this pull request as ready for review November 4, 2025 22:34
@mikebarkmin mikebarkmin merged commit ffe7e4b into main Nov 4, 2025
3 checks passed
@mikebarkmin mikebarkmin deleted the copilot/generate-llms-txt-file branch November 4, 2025 22:34
@github-actions github-actions bot mentioned this pull request Nov 4, 2025
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