Skip to content

website: fix serial CR handling and docs link rewriting#24

Merged
zevorn merged 2 commits intomainfrom
website/serial-cr-and-docs-links
Mar 15, 2026
Merged

website: fix serial CR handling and docs link rewriting#24
zevorn merged 2 commits intomainfrom
website/serial-cr-and-docs-links

Conversation

@zevorn
Copy link
Copy Markdown
Owner

@zevorn zevorn commented Mar 15, 2026

Summary

  • Serial terminal: refactor to line-based div structure, implement \r (carriage return) as current-line overwrite — fixes "thinking ." animation not displaying in real-time
  • Docs viewer: intercept rendered .md links (../zh/xxx.md, coding-style.md) and rewrite to docs.html?doc=xxx to prevent 404

Test plan

  • Serial: connect to device, verify "thinking ." animation overwrites in real-time
  • Docs: click cross-language link (English/中文), verify language switches without 404
  • Docs: click inter-doc link (e.g. Coding Style in Contributing), verify navigation works

Signed-off-by: Chao Liu chao.liu.zevorn@gmail.com

zevorn added 2 commits March 15, 2026 17:31
Refactor serial output from flat span appending to line-based
div structure.  Each line is a <div>, spans go inside it.
\r (carriage return) clears the current line div, enabling
real-time overwrite animations like "thinking ." / "thinking .."
that embedded firmware commonly outputs.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Intercept rendered markdown links after marked.js parsing:
- ../zh/xxx.md / ../en/xxx.md → switch language and load doc
- xxx.md → load doc in current language
All links rewritten to docs.html?doc=xxx format.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
@zevorn zevorn merged commit c0f5140 into main Mar 15, 2026
1 check passed
@zevorn zevorn deleted the website/serial-cr-and-docs-links branch March 15, 2026 09:35
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.

1 participant