Skip to content

feat(redirects): add script to generate HTML meta-refresh stubs for v1 to v2 migration#1573

Merged
oss-maintainer merged 1 commit into
mainfrom
fix-website-deployment
Jun 2, 2026
Merged

feat(redirects): add script to generate HTML meta-refresh stubs for v1 to v2 migration#1573
oss-maintainer merged 1 commit into
mainfrom
fix-website-deployment

Conversation

@chickenlj

Copy link
Copy Markdown
Collaborator

No description provided.

@chickenlj chickenlj requested review from a team and Copilot June 2, 2026 16:32
@oss-maintainer oss-maintainer merged commit be8df5b into main Jun 2, 2026
11 checks passed
@chickenlj chickenlj deleted the fix-website-deployment branch June 2, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the docs deployment pipeline to generate HTML meta-refresh redirect stubs so legacy v1 documentation URLs (e.g., /en/harness/overview.html) continue to work after the v1→v2 docs path migration, and makes small copy edits in v2 docs.

Changes:

  • Add docs/scripts/generate_v1_redirects.py to generate legacy-path redirect HTML stubs pointing to the new /v1/... paths.
  • Wire the redirect generation into the GitHub Pages workflow after the Jupyter Book build.
  • Minor wording updates in v2 English intro/docs pages; adjust docs pyproject.toml packaging shim configuration.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/v2/en/intro.md Updates Harness marketing copy (“bedrock” → “scaffolding”).
docs/v2/en/docs/index.md Updates Harness marketing copy (“bedrock” → “scaffolding”).
docs/scripts/generate_v1_redirects.py Adds a redirect-stub generator for legacy v1 URL compatibility.
docs/pyproject.toml Updates docs toolchain install shim config and readme path.
.github/workflows/website.yml Runs redirect-stub generation step between build and deploy.

Comment on lines +51 to +65
STUB_TEMPLATE = """<!doctype html>
<html lang="{lang}">
<head>
<meta charset="utf-8">
<title>Redirecting&hellip;</title>
<link rel="canonical" href="{canonical}">
<meta http-equiv="refresh" content="0; url={target}">
<script>location.replace({target_json});</script>
<style>body{{font-family:system-ui,sans-serif;max-width:32em;margin:4em auto;padding:0 1em;color:#444}}</style>
</head>
<body>
<p>This page has moved. Redirecting to <a href="{target}">{target}</a>&hellip;</p>
</body>
</html>
"""
Comment on lines +163 to +166
if out_path.exists():
# Never clobber a real page that the build actually produced.
skipped_existing += 1
continue
Comment on lines +106 to +116
def render_stub(lang: str, root_relative_target: str, site_base: str) -> str:
canonical = (site_base.rstrip("/") + root_relative_target) if site_base else root_relative_target
# JSON-encode for embedding in JS so any future special chars survive
import json

return STUB_TEMPLATE.format(
lang=lang,
target=root_relative_target,
target_json=json.dumps(root_relative_target),
canonical=canonical,
)
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants