Skip to content

Commit 19fe567

Browse files
authored
Merge pull request #15 from MarcoDotIO/codex/docc-root-redirect
fix: redirect DocC site root
2 parents 7264466 + e570a7e commit 19fe567

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
pull_request:
88

9+
env:
10+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11+
912
concurrency:
1013
group: docs-${{ github.event.pull_request.number || github.sha }}
1114
cancel-in-progress: true

Scripts/build-docs-site.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MERGED_ARCHIVE_PATH="${DOCC_MERGED_ARCHIVE_PATH:-${ROOT_DIR}/.build/OpenClawKit.
77
SITE_OUTPUT_PATH="${DOCC_STATIC_SITE_OUTPUT_PATH:-${ROOT_DIR}/.build/docc-static-site}"
88
HOSTING_BASE_PATH="${DOCC_HOSTING_BASE_PATH:-/OpenClawKit}"
99
SCHEME="${DOCC_SCHEME:-OpenClawKit-Package}"
10+
ROOT_INDEX_PATH="${SITE_OUTPUT_PATH}/index.html"
1011
FIRST_PARTY_MODULES=(
1112
OpenClawProtocol
1213
OpenClawCore
@@ -57,5 +58,22 @@ xcrun docc process-archive transform-for-static-hosting \
5758
--output-path "${SITE_OUTPUT_PATH}" \
5859
--hosting-base-path "${HOSTING_BASE_PATH}"
5960

60-
test -f "${SITE_OUTPUT_PATH}/index.html"
61+
docs_landing_path="${HOSTING_BASE_PATH%/}/documentation/openclawkit/"
62+
cat > "${ROOT_INDEX_PATH}" <<EOF
63+
<!doctype html>
64+
<html lang="en">
65+
<head>
66+
<meta charset="utf-8">
67+
<meta http-equiv="refresh" content="0; url=${docs_landing_path}">
68+
<meta name="viewport" content="width=device-width, initial-scale=1">
69+
<title>OpenClawKit Documentation</title>
70+
<script>location.replace("${docs_landing_path}");</script>
71+
</head>
72+
<body>
73+
<p>Redirecting to <a href="${docs_landing_path}">OpenClawKit Documentation</a>...</p>
74+
</body>
75+
</html>
76+
EOF
77+
78+
test -f "${ROOT_INDEX_PATH}"
6179
test -d "${SITE_OUTPUT_PATH}/documentation/openclawkit"

0 commit comments

Comments
 (0)