@@ -13,6 +13,8 @@ interface PluginOptions {
1313 description ?: string ;
1414 // Additional path to ignore in addition to the categories
1515 ignorePaths ?: string [ ] ;
16+ // A title for the links that are identified at the root. By default: General
17+ generalCategoryTitle ?: string ;
1618}
1719
1820/**
@@ -33,7 +35,8 @@ export default function docusaurusPluginLLMs(
3335 const {
3436 docsDir,
3537 description,
36- ignorePaths = [ ]
38+ ignorePaths = [ ] ,
39+ generalCategoryTitle = "General"
3740 } = {
3841 docsDir : "docs" ,
3942 ...userOptions
@@ -101,6 +104,7 @@ export default function docusaurusPluginLLMs(
101104 dataRoutes,
102105 description,
103106 docsDir,
107+ generalCategoryTitle,
104108 ...context
105109 } ) ;
106110
@@ -304,12 +308,14 @@ const generateLlmsTxt = async ({
304308 siteConfig : { url, ...restSiteConfig } ,
305309 outDir,
306310 description,
307- docsDir
311+ docsDir,
312+ generalCategoryTitle
308313} : {
309314 groupedRoutes : GroupedRoutes ;
310315 dataRoutes : RoutesData ;
311316} & Pick < LoadContext , "siteConfig" | "outDir" > &
312- Pick < PluginOptions , "description" | "docsDir" > ) => {
317+ Pick < PluginOptions , "description" | "docsDir" > &
318+ Required < Pick < PluginOptions , "generalCategoryTitle" > > ) => {
313319 const buildLink = ( route : string ) : string | undefined => {
314320 const data = dataRoutes . get ( route ) ;
315321
@@ -327,7 +333,7 @@ const generateLlmsTxt = async ({
327333
328334 const buildTitle = ( key : string ) => {
329335 if ( key === `/${ docsDir } ` ) {
330- return `## General ` ;
336+ return `## ${ generalCategoryTitle } ` ;
331337 }
332338
333339 const titles = key
0 commit comments