Skip to content

Conversation

@josh-wong
Copy link
Member

@josh-wong josh-wong commented Aug 7, 2025

Description

This PR updates the process for generating llms-full.txt during Docusaurus site builds, switching from the default plugin-based method to a custom script that leverages gitingest for richer documentation context. The main changes introduce a new Python script, update build tooling, and provide detailed documentation for this new workflow.

Related issues and/or PRs

Changes made

  • Added scripts/generate-llms-full.py, a Python script that installs gitingest if necessary and generates llms-full.txt with improved metadata and context for AI models.
  • The build script in package.json now runs a new generate-llms-full step, which executes the Python script to generate a comprehensive llms-full.txt by using gitingest.
  • Updated docusaurus.config.js to disable the plugin's built-in generateLLMsFullTxt option, clarifying that the new method is preferred and referencing the documentation for details.
  • Added scripts/README.md, which explains the motivation, usage, requirements, and benefits of the new generate-llms-full.py script and the gitingest-based workflow.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have updated the side navigation as necessary.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Introduces `scripts/generate-llms-full.py` to generate `llms-full.txt` by leveraging the gitingest package instead of `docusaurus-plugin-llms`. The script handles installation of gitingest if missing, configures include/exclude patterns, and writes the output to the build directory.
Introduces a new npm script `generate-llms-full` that runs a Python script for generating LLMs data. The build process now includes this step to ensure LLMs data is generated during builds.
Set `generateLLMsFullTxt` to false in `docusaurus-plugin-llms` configuration. This change is made because gitingest is now used to generate a more detailed llms-full.txt file.
Introduces documentation explaining the purpose, usage, requirements, and configuration of the `generate-llms-full.py` script. The README details how the script uses gitingest to create an AI-friendly `llms-full.txt` file with enhanced context for documentation.
@josh-wong josh-wong requested a review from Copilot August 7, 2025 06:53
@josh-wong josh-wong self-assigned this Aug 7, 2025
@josh-wong josh-wong added the improvement Improvements made to an existing feature label Aug 7, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @josh-wong, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've updated our Docusaurus site build process to generate llms-full.txt using a custom Python script that leverages gitingest. This change moves away from the default plugin-based method to provide a more comprehensive and context-rich llms-full.txt file, which includes front-matter metadata and directory structure, making our documentation more effective for AI models.

Highlights

  • Custom LLM file generation: I've introduced scripts/generate-llms-full.py, a new Python script that utilizes gitingest to create llms-full.txt with enhanced metadata and context for AI models.
  • Build process integration: The Docusaurus build script in package.json now includes a new step to execute this Python script, ensuring llms-full.txt is generated during every build.
  • Plugin option disabled: I've updated docusaurus.config.js to disable the docusaurus-plugin-llms plugin's built-in generateLLMsFullTxt option, explicitly indicating our reliance on the new custom script.
  • New documentation: I've added scripts/README.md to provide detailed documentation on the motivation, usage, requirements, and benefits of this new gitingest-based workflow.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively replaces the docusaurus-plugin-based generation of llms-full.txt with a custom Python script using gitingest. The changes are well-documented with a new README, and the build process is correctly updated. The Python script itself is robust, with good error handling. I've provided a couple of suggestions to improve the clarity of the documentation and the maintainability of the new script by refactoring hardcoded values into constants.

Copy link
Contributor

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 custom script-based approach for generating llms-full.txt that leverages gitingest to provide richer documentation context and metadata for AI models, replacing the default plugin-based method.

Key Changes

  • New Python script: Added generate-llms-full.py that uses gitingest to create comprehensive llms-full.txt with front-matter metadata and directory tree structure
  • Updated build process: Modified the build pipeline to include the new script execution and disabled the plugin's built-in generation
  • Enhanced CI/CD: Updated GitHub Actions workflows to install the required Python dependency

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/generate-llms-full.py Core Python script that generates llms-full.txt using gitingest with custom filtering and formatting
scripts/README.md Documentation explaining the motivation, usage, and benefits of the new gitingest-based approach
package.json Added generate-llms-full script command and integrated it into the build process
docusaurus.config.js Disabled plugin's built-in generateLLMsFullTxt option with reference to new documentation
.github/workflows/test-deploy.yml Added Python dependency installation for gitingest
.github/workflows/deploy.yml Added Python dependency installation for gitingest

@josh-wong josh-wong merged commit 99ba76a into main Aug 7, 2025
1 check passed
@josh-wong josh-wong deleted the generate-llms-full.txt-by-using-gitingest-script branch August 7, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvements made to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant