Skip to content

fix(share): add stable short links for Chinese routes - #15

Merged
Machillka merged 1 commit into
mainfrom
fix/share-link
Aug 28, 2026
Merged

fix(share): add stable short links for Chinese routes#15
Machillka merged 1 commit into
mainfrom
fix/share-link

Conversation

@Machillka

@Machillka Machillka commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes unreliable sharing of Chinese routes by introducing stable, ASCII-only short IDs.

Changes

  • Generate and validate stable short IDs during build.
  • Keep IDs in a dedicated registry instead of page frontmatter.
  • Resolve shared URLs under the configured baseUrl:
    https://yuufrag.machillka.com/s/<id>
  • Copy the sharing URL only after the user clicks “分享”.
  • Publish /s/<id> redirect pages with the main VitePress artifact.
  • Add collision, artifact consistency, redirect, fallback, and UI-state checks.

Related issue

Fixes #14

- generate and validate stable short IDs during build
- use the configured base URL for shared links
- add a VitePress-native copy dropdown on every page
- publish and verify short-link artifacts in CI
- cover collisions, redirects, fallbacks, and UI states
@Machillka
Machillka merged commit aef5877 into main Aug 28, 2026
3 checks passed
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.

[Bug] 中文页面路由在跨平台分享时产生不一致编码,重复编码后可能无法访问

1 participant