Skip to content

Commit 704404b

Browse files
committed
feat: Add simplified index.html redirect for DocC documentation
- Creates index.html that redirects to the actual documentation - Follows same pattern as 'me' project for simplified HTML - Provides fallback link if JavaScript redirect fails
1 parent 679e791 commit 704404b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

scripts/publish-docc-to-github-pages.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,26 @@ if [ -n "$STATIC_DOCS_DIR" ] && [ -d "$STATIC_DOCS_DIR" ]; then
224224
exit 1
225225
}
226226

227+
# Create a simplified index.html that redirects to the documentation
228+
echo -e "${GREEN}Creating simplified index.html...${NC}"
229+
cat > "$CLONE_DIR/$DOCS_DIR/index.html" << EOF
230+
<!DOCTYPE html>
231+
<html lang="en">
232+
<head>
233+
<meta charset="UTF-8">
234+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
235+
<meta http-equiv="refresh" content="0; url=/${DOCS_DIR}/documentation/${PACKAGE_NAME,,}/">
236+
<title>${PACKAGE_NAME} Documentation</title>
237+
<script>
238+
window.location.href = "/${DOCS_DIR}/documentation/${PACKAGE_NAME,,}/";
239+
</script>
240+
</head>
241+
<body>
242+
<p>Redirecting to <a href="/${DOCS_DIR}/documentation/${PACKAGE_NAME,,}/">${PACKAGE_NAME} Documentation</a>...</p>
243+
</body>
244+
</html>
245+
EOF
246+
227247
echo -e "${GREEN}Documentation copied successfully${NC}"
228248
else
229249
echo -e "${YELLOW}DocC documentation not found, creating static fallback site${NC}"

0 commit comments

Comments
 (0)