Skip to content

Commit fc071b4

Browse files
authored
Generate llms.txt files on build for LLM reference (#1404)
* Add `docusaurus-plugin-llms` dependency Added `docusaurus-plugin-llms` version 0.1.5 to enable new plugin functionality. * Add `docusaurus-plugin-llms` to config Integrated `docusaurus-plugin-llms` with configuration options for generating LLMs text files and content cleaning. Also corrected the tagline capitalization for consistency.
1 parent 97a2a4a commit fc071b4

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

docusaurus.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,21 @@ const config = {
279279
},
280280
],
281281
require.resolve('docusaurus-plugin-image-zoom'),
282+
[
283+
'docusaurus-plugin-llms',
284+
{
285+
generateLLMsTxt: true,
286+
generateLLMsFullTxt: true,
287+
docsDir: 'docs',
288+
version: 'latest',
289+
title: 'ScalarDB Documentation',
290+
description: 'Cloud-native universal transaction manager',
291+
// Content cleaning options
292+
excludeImports: true, // This configuration currently option doesn't seem to work as expected. I don't think it's a major issue, but we should upgrade the plugin when a new version is available to see if the issue is fixed.
293+
removeDuplicateHeadings: true, // This configuration currently option doesn't seem to work as expected. I don't think it's a major issue, but we should upgrade the plugin when a new version is available to see if the issue is fixed.
294+
includeUnmatchedLast: true,
295+
},
296+
],
282297
[
283298
'@docusaurus/plugin-pwa',
284299
{

package-lock.json

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"clsx": "^2.0.0",
3434
"docusaurus-lunr-search": "^3.3.2",
3535
"docusaurus-plugin-image-zoom": "^2.0.0",
36+
"docusaurus-plugin-llms": "^0.1.5",
3637
"prism-react-renderer": "^2.3.0",
3738
"react": "^18.0.0",
3839
"react-cookie-consent": "9.0.0",

0 commit comments

Comments
 (0)