Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions remote-content/remote-sources/guide-inference-scheduling.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Guide Inference Scheduling Remote Content
*
*
* Downloads the inference scheduling README.md file from the llm-d-infra repository
* and transforms it into docs/guide/Installation/inference-scheduling.md
*/
Expand All @@ -15,11 +15,11 @@ export default [
sourceBaseUrl: 'https://raw.githubusercontent.com/llm-d-incubation/llm-d-infra/main/',
outDir: 'docs/guide/Installation',
documents: ['quickstart/examples/inference-scheduling/README.md'],

// Plugin behavior
noRuntimeDownloads: false, // Download automatically when building
performCleanup: true, // Clean up files after build

// Transform the content for this specific document
modifyContent(filename, content) {
if (filename === 'quickstart/examples/inference-scheduling/README.md') {
Expand All @@ -35,24 +35,40 @@ export default [
content,
// Transform content to work in docusaurus context
contentTransform: (content) => content
// Fix relative links
.replace(/\]\(\.\.\//g, '](../../')
.replace(/\]\(\.\//g, '](')
// Fix MDX compilation issues with angle bracket URLs
.replace(/<(http[s]?:\/\/[^>]+)>/g, '`$1`')
// Fix specific broken links to point to repository

// CRITICAL: Fix istio-workaround.md FIRST before any other URL transformations
.replace(/\]\([^)]*istio-workaround\.md\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/istio-workaround.md)')

// Fix specific problematic links first (before general patterns)
.replace(/\[install\-deps\.sh\]\(\.\.\/\.\.\/install\-deps\.sh\)/g, '[install-deps.sh](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/install-deps.sh)')
.replace(/\[gke\.md\]\(gke\.md\)/g, '[gke.md](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/examples/inference-scheduling/gke.md)')
.replace(/\[Temporary Istio Workaround\]\(\.\.\/\.\.\/\.\.\/istio-workaround\.md\)/g, '[Temporary Istio Workaround](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/istio-workaround.md)')
.replace(/\[gke\.md\]\(\.\/gke\.md\)/g, '[gke.md](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/examples/inference-scheduling/gke.md)')
.replace(/\[scheduling configuration\]\(https\:\/\/github\.com\/llm\-d\/llm\-d\-inference\-scheduler\/blob\/main\/docs\/architecture\.md\)/g, '[scheduling configuration](https://github.com/llm-d/llm-d-inference-scheduler/blob/main/docs/architecture.md)')

// Fix broken external references
.replace(/\]\(\.\.\/\.\.\/precise-prefix-cache-aware\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/tree/main/quickstart/examples/precise-prefix-cache-aware)')
// Fix file references to point to repository
.replace(/\]\(([^)]+\.(yaml|sh))\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/examples/inference-scheduling/$1)')
.replace(/\]\(precise-prefix-cache-aware\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/tree/main/quickstart/examples/precise-prefix-cache-aware)')
.replace(/\]\(\.\.\/precise-prefix-cache-aware\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/tree/main/quickstart/examples/precise-prefix-cache-aware)')

// Fix relative path resolution for install-deps.sh (catch any remaining patterns)
.replace(/\]\(\.\.\/\.\.\/\.\.\/([^)]+\.sh)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/$1)')
// Convert other relative markdown links to repository links
.replace(/\]\(([^)]+\.md)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/examples/inference-scheduling/$1)')
// Fix any remaining ../../../*.md patterns before general md processing
.replace(/\]\(\.\.\/\.\.\/\.\.\/([^)]+\.md)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/$1)')

// Fix relative links (but be more careful)
.replace(/\]\(\.\.\//g, '](../../')
.replace(/\]\(\.\//g, '](')

// Fix file references to point to repository (only if not already a full URL)
.replace(/\]\((?!https?:\/\/)([^)]+\.(yaml|sh))\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/examples/inference-scheduling/$1)')

// Convert other relative markdown links to repository links (only if not already a full URL)
.replace(/\]\((?!https?:\/\/)([^)]+\.md)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/examples/inference-scheduling/$1)')
});
}
return undefined;
},
},
];
];
36 changes: 25 additions & 11 deletions remote-content/remote-sources/guide-prerequisites.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Guide Prerequisites Remote Content
*
*
* Downloads the quickstart README.md file from the llm-d-infra repository
* and transforms it into docs/guide/Installation/prerequisites.md
*/
Expand All @@ -15,11 +15,11 @@ export default [
sourceBaseUrl: 'https://raw.githubusercontent.com/llm-d-incubation/llm-d-infra/main/',
outDir: 'docs/guide/Installation',
documents: ['quickstart/README.md'],

// Plugin behavior
noRuntimeDownloads: false, // Download automatically when building
performCleanup: true, // Clean up files after build

// Transform the content for this specific document
modifyContent(filename, content) {
if (filename === 'quickstart/README.md') {
Expand All @@ -35,22 +35,36 @@ export default [
content,
// Transform content to work in docusaurus context
contentTransform: (content) => content
// Fix any relative links that might break
.replace(/\]\(examples\//g, '](../')
.replace(/\]\(\.\//g, '](')
// Fix MDX compilation issues with angle bracket URLs
.replace(/<(http[s]?:\/\/[^>]+)>/g, '`$1`')
// Convert relative markdown links to repository links
.replace(/\]\(([^)]+\.md)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/$1)')
// Fix file links to point to repository
.replace(/\]\(([^)]+\.(yaml|json|sh))\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/$1)')
// Fix broken anchor reference
.replace(/#openshift-and-grafana/g, '#install-on-openshift')

// Fix specific problematic links first (before general patterns)
.replace(/\[Grafana\ setup\ guide\]\(\.\/grafana\-setup\.md\)/g, '[Grafana setup guide](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/docs/monitoring/grafana-setup.md)')
.replace(/\[llm\-d dashboard\]\(\.\/grafana\/dashboards\/llm\-d\-dashboard\.json\)/g, '[llm-d dashboard](https://raw.githubusercontent.com/llm-d-incubation/llm-d-infra/refs/heads/main/quickstart/docs/monitoring/grafana/dashboards/llm-d-dashboard.json)')
.replace(/\[inference\-gateway\ dashboard\]\(https\:\/\/github\.com\/kubernetes\-sigs\/gateway\-api\-inference\-extension\/blob\/main\/tools\/dashboards\/inference\_gateway\.json\)/g, '[inference-gateway dashboard](https://raw.githubusercontent.com/kubernetes-sigs/gateway-api-inference-extension/refs/heads/main/tools/dashboards/inference_gateway.json)')

// Fix OpenShift documentation links - use a simple string replacement first
.replace(/docs\/infra-providers\/openshift\/README-openshift\.md/g, 'https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/docs/infra-providers/openshift/README-openshift.md')
// More general pattern for remaining docs paths (only if not already a full URL)
.replace(/\]\((?!https?:\/\/)docs\/([^)]+)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/docs/$1)')

// Fix relative path references to files
.replace(/\]\(grafana\/dashboards\/([^)]+)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/grafana/dashboards/$1)')

// Fix any remaining relative links that might break (but avoid full URLs)
.replace(/\]\(examples\//g, '](../')
.replace(/\]\(\.\//g, '](')

// Convert relative markdown links to repository links (only if not already a full URL)
.replace(/\]\((?!https?:\/\/)([^)]+\.md)\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/$1)')
// Fix file links to point to repository (only if not already a full URL)
.replace(/\]\((?!https?:\/\/)([^)]+\.(yaml|json|sh))\)/g, '](https://github.com/llm-d-incubation/llm-d-infra/blob/main/quickstart/$1)')

});
}
return undefined;
},
},
];
];
4 changes: 2 additions & 2 deletions src/components/Install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function Install() {
alt="2. "
src={require('/docs/assets/counting-02.png').default}
></img>
<a className="link" href="docs/guide/Installation/quickstart#install">
<a className="link" href="docs/guide/Installation/prerequisites">
Run the Quickstart
</a>
</h3>
Expand All @@ -46,7 +46,7 @@ export default function Install() {
alt="3. "
src={require('/docs/assets/counting-03.png').default}
></img>
<a className="link" href="docs/guide/Installation/quickstart#examples">Explore llm-d!</a></h3>
<a className="link" href="docs/guide/Installation/prerequisites#examples">Explore llm-d!</a></h3>
{/* -------------------------------------------------------------------------- */}
<a className="static-button install-button button-link" href="docs/guide">
Complete install methods here
Expand Down