Skip to content

fix(docs): upload clean URL aliases to TOS#2055

Merged
MaojiaSheng merged 1 commit into
volcengine:mainfrom
yufeng201:codex/analyze-docs-net-404
May 15, 2026
Merged

fix(docs): upload clean URL aliases to TOS#2055
MaojiaSheng merged 1 commit into
volcengine:mainfrom
yufeng201:codex/analyze-docs-net-404

Conversation

@yufeng201

Copy link
Copy Markdown
Collaborator

Description

Fix clean URL routes on the TOS-hosted docs site by uploading extensionless HTML aliases for VitePress pages. This makes URLs such as /zh/getting-started/02-quickstart resolve on docs.openviking.net, matching the GitHub Pages behavior on docs.openviking.ai.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Keep uploading the generated .html docs files to TOS.
  • Upload an additional extensionless object for each generated page HTML file.
  • Preserve text/html; charset=utf-8 and the existing HTML revalidation cache policy for clean URL aliases.
  • Leave index.html, 404.html, and long-lived static asset handling unchanged.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Validation commands:

  • env PATH=/Users/bytedance/.nvm/versions/node/v22.22.2/bin:/usr/bin:/bin:/usr/sbin:/sbin npm run docs:build
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/docs-tos.yml"); puts "yaml ok"'
  • git diff --check
  • Verified the upload loop maps zh/getting-started/02-quickstart.html to zh/getting-started/02-quickstart.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

Root cause: VitePress is configured with cleanUrls: true, so site links omit .html. GitHub Pages resolves those clean URLs automatically, but TOS currently performs exact object key lookup and returns NoSuchKey for extensionless page paths unless those aliases are uploaded.

@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 515ca35)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 95
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@yufeng201 yufeng201 marked this pull request as ready for review May 14, 2026 14:24
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 515ca35

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@MaojiaSheng MaojiaSheng merged commit 090b18e into volcengine:main May 15, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants