Skip to content

feat(config): add LLMS plugin to Docusaurus configuration#825

Merged
fassko merged 19 commits intomainfrom
feat/generate-llms-txt
Sep 1, 2025
Merged

feat(config): add LLMS plugin to Docusaurus configuration#825
fassko merged 19 commits intomainfrom
feat/generate-llms-txt

Conversation

@fassko
Copy link
Collaborator

@fassko fassko commented Aug 14, 2025

No description provided.

@fassko fassko requested a review from dineshpinto as a code owner August 14, 2025 09:51
@fassko fassko self-assigned this Aug 14, 2025
@fassko fassko force-pushed the feat/generate-llms-txt branch from b6ca3ac to ca33dc3 Compare August 14, 2025 14:36
@dineshpinto
Copy link
Member

Paths being generated are not correct (docusaurus removes prepended number, the tool doesn't):

## Table of Contents

- [Network](https://dev.flare.network/docs/network/0-overview): Learn about the different Flare networks, configuration, supported wallets, transaction format, smart contracts, consensus, and more.
- [Getting Started](https://dev.flare.network/docs/network/1-getting-started): Deploy a smart contract on Flare using your browser.

Ordering is not followed, use the full glob pattern, e.g.:

includeOrder: [
  "**/network/**/*.mdx",
  "**/ftso/**/*.mdx",
  ...

@fassko fassko force-pushed the feat/generate-llms-txt branch 2 times, most recently from 8273836 to 4c3ce83 Compare August 19, 2025 08:07
const content = fs.readFileSync(filePath, "utf8");

// Fix URLs by removing prepended numbers
// Pattern: https://dev.flare.network/docs/network/0-overview -> https://dev.flare.network/docs/network/overview
Copy link
Member

Choose a reason for hiding this comment

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

why is there docs in the path, dev hub is served from /
e.g.
https://dev.flare.network/network/overview

# Check if LLMs files were generated
if [ ! -f "build/llms.txt" ] || [ ! -f "build/llms-full.txt" ]; then
echo "❌ LLMs files not found!"
exit 1
Copy link
Member

Choose a reason for hiding this comment

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

This will fail the entire deploy if the script check fails, since this is an auxilliary feature this should just be a warning in the logs

@fassko fassko requested a review from dineshpinto August 19, 2025 11:30
@fassko fassko changed the title feat(config): add SignalWire LLMS plugin to Docusaurus configuration feat(config): add LLMS plugin to Docusaurus configuration Aug 19, 2025
@fassko fassko force-pushed the feat/generate-llms-txt branch 2 times, most recently from 67290b7 to a48f2e6 Compare August 28, 2025 08:26
package.json Outdated
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"docusaurus-plugin-llms": "^0.1.5",
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

From the changelog, it natively handles numbered files and partials

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for noticing this. It dramatically improves the flow. 🫡

@fassko
Copy link
Collaborator Author

fassko commented Aug 29, 2025

@dineshpinto I had to in the end rename the fassets developer guides files to their slugs because the plugin got lost, and it was also to keep them in order

@fassko fassko requested a review from dineshpinto August 29, 2025 11:44
@fassko fassko force-pushed the feat/generate-llms-txt branch from e6f4ac0 to 6d37d81 Compare September 1, 2025 08:09
@fassko fassko merged commit 0cd8c70 into main Sep 1, 2025
13 checks passed
@fassko fassko deleted the feat/generate-llms-txt branch September 1, 2025 08:10
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