Skip to content

Commit cd3430c

Browse files
authored
Fix slug collision for getting-started documentation in sync-docs.sh (llm-d#426)
Ensure the getting-started documentation correctly uses the slug "/getting-started" to avoid rendering issues with the homepage redirect. This change aligns the documentation structure with the existing routing logic in the application. Signed-off-by: Pete Cheslock <pete.cheslock@redhat.com>
1 parent ff76019 commit cd3430c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

preview/scripts/sync-docs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ if [[ -f "$WIP/getting-started/README.mdx" ]]; then
125125
else
126126
cp_doc "$WIP/getting-started/README.md" "$DOCS_DIR/getting-started/index.md"
127127
fi
128+
# Upstream's README.mdx sets `slug: /`, claiming this site's root route. But
129+
# src/pages/index.tsx already owns "/" everywhere (a <Redirect> to
130+
# /getting-started, baseUrl-aware), so the two collide and "/" ends up
131+
# rendering neither — an empty, unhydratable shell in every build. Force
132+
# this doc back to its natural /getting-started slug so the pages-plugin
133+
# homepage redirect keeps working as designed.
134+
set_doc_slug "$DOCS_DIR/getting-started/index.mdx" "/getting-started"
135+
set_doc_slug "$DOCS_DIR/getting-started/index.md" "/getting-started"
128136
cp_doc "$WIP/getting-started/quickstart.md" "$DOCS_DIR/getting-started/quickstart.md"
129137
cp_doc "$WIP/getting-started/feature-matrix.md" "$DOCS_DIR/getting-started/feature-matrix.md"
130138
cp_doc "$WIP/getting-started/accelerators.md" "$DOCS_DIR/getting-started/accelerators.md"

0 commit comments

Comments
 (0)