/ docs / docusaurusConfigUtils.ts
docusaurusConfigUtils.ts
 1  export function postProcessSidebar(items) {
 2    // Remove items with customProps.hide set to true
 3    return items.filter((item) => item.customProps?.hide !== true);
 4  }
 5  
 6  export function apiReferencePrefix(): string {
 7    let prefix = process.env.API_REFERENCE_PREFIX || 'https://mlflow.org/docs/latest/';
 8    if (!prefix.startsWith('http')) {
 9      throw new Error(`API reference prefix must start with http, got ${prefix}`);
10    }
11  
12    if (!prefix.endsWith('/')) {
13      prefix += '/';
14    }
15    return prefix;
16  }