Skip to content

Commit f6ae045

Browse files
committed
Add guide-precise-prefix-cache-aware remote content source
- Introduced a new remote content source for the precise prefix cache aware guide, enabling automatic fetching and transformation of the README.md from the llm-d-infra repository. - Updated remote-content.js to include the new source in the plugin system. Signed-off-by: Pete Cheslock <[email protected]>
1 parent ea17c02 commit f6ae045

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

remote-content/remote-content.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import guidePrerequisitesSource from './remote-sources/guide/guide-prerequisites
1616
import guideInferenceSchedulingSource from './remote-sources/guide/guide-inference-scheduling.js';
1717
import guidePdDisaggregationSource from './remote-sources/guide/guide-pd-disaggregation.js';
1818
import guideWideEpLwsSource from './remote-sources/guide/guide-wide-ep-lws.js';
19+
import guidePrecisePrefixCacheAwareSource from './remote-sources/guide/guide-precise-prefix-cache-aware.js';
1920

2021
/**
2122
* Remote Content Plugin System
@@ -52,6 +53,7 @@ const remoteContentPlugins = [
5253
guideInferenceSchedulingSource,
5354
guidePdDisaggregationSource,
5455
guideWideEpLwsSource,
56+
guidePrecisePrefixCacheAwareSource,
5557

5658
// Add more remote sources here in the appropriate section above
5759
];
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* Guide Precise Prefix Cache Aware Remote Content
3+
*
4+
* Downloads the precise-prefix-cache-aware README.md file from the llm-d-infra repository
5+
* and transforms it into docs/guide/Installation/precise-prefix-cache-aware.md
6+
*/
7+
8+
import { createContentWithSource, createStandardTransform } from '../utils.js';
9+
import { findRepoConfig, generateRepoUrls } from '../component-configs.js';
10+
11+
// Get repository configuration from centralized config
12+
const repoConfig = findRepoConfig('llm-d-infra');
13+
const { repoUrl, sourceBaseUrl } = generateRepoUrls(repoConfig);
14+
const contentTransform = createStandardTransform('llm-d-infra');
15+
16+
export default [
17+
'docusaurus-plugin-remote-content',
18+
{
19+
// Basic configuration - all URLs generated from centralized config
20+
name: 'guide-precise-prefix-cache-aware',
21+
sourceBaseUrl,
22+
outDir: 'docs/guide/Installation',
23+
documents: ['quickstart/examples/precise-prefix-cache-aware/README.md'],
24+
25+
// Plugin behavior
26+
noRuntimeDownloads: false,
27+
performCleanup: true,
28+
29+
// Transform the content for this specific document
30+
modifyContent(filename, content) {
31+
if (filename === 'quickstart/examples/precise-prefix-cache-aware/README.md') {
32+
return createContentWithSource({
33+
title: 'Precise Prefix Cache Aware Example',
34+
description: 'Example implementation of precise prefix cache awareness in llm-d',
35+
sidebarLabel: 'Precise Prefix Cache Aware',
36+
sidebarPosition: 5,
37+
filename: 'quickstart/examples/precise-prefix-cache-aware/README.md',
38+
newFilename: 'precise-prefix-cache-aware.md',
39+
repoUrl,
40+
branch: repoConfig.branch,
41+
content,
42+
contentTransform
43+
});
44+
}
45+
return undefined;
46+
},
47+
},
48+
];

0 commit comments

Comments
 (0)