Skip to content

Unify Chinese-doc anchor IDs to stable English slugs#326

Merged
Benson0224 merged 4 commits into
tronprotocol:masterfrom
abn2357:unify_chinese_anchor
May 20, 2026
Merged

Unify Chinese-doc anchor IDs to stable English slugs#326
Benson0224 merged 4 commits into
tronprotocol:masterfrom
abn2357:unify_chinese_anchor

Conversation

@abn2357
Copy link
Copy Markdown
Contributor

@abn2357 abn2357 commented May 12, 2026

Summary

Anchors in the Chinese docs were a mix of auto-generated slugs (#_1, #_2), HTML <a id> tags, and ad-hoc placeholders (#step1, #private_key). Cross-file references also used absolute site URLs. This PR makes them consistent.

  • Unify anchor IDs to stable English slugs across 18 docs — replace <a id="x"></a> and Python-Markdown auto-slugs with attr_list { #english-id } syntax on the heading itself
  • Convert URL-form internal refs to relative file.md#anchor links — drop https://tronprotocol.github.io/documentation-zh/... paths so refs survive site moves and work in local preview
  • Replace non-semantic anchor IDs with descriptive slugs
    • strip numeric noise (#step1, #2-operations-..., #checking-system-configuration-1)
    • rename IDs that didn't reflect the heading (#private_key#key-management, #fullnode-jvm#mainnet-fullnode-jvm-tuning, etc.)
    • disambiguate the duplicate 推荐系统配置 headings with section prefixes (#kafka-system-requirements, #mongodb-system-requirements)

All same-file and cross-file references were updated to match.

Test plan

  • mkdocs serve locally and click through anchor links in the changed files
  • Verify the Kafka/MongoDB 推荐系统配置 sections both resolve to distinct anchors
  • Spot-check cross-file refs (toolkit ↔ event ↔ installing_javatron ↔ upgrade-instruction)

abn2357 added 4 commits May 11, 2026 17:37
Convert all <a id="x"></a> HTML anchors and auto-generated Chinese slugs
(#_1, #_2, etc.) to explicit attr_list IDs ({ #english-id }) on headings.
Sync all same-page and cross-file references, including URL-form links.
Replace https://tronprotocol.github.io/documentation-zh/... links with
relative file.md(#anchor) paths so navigation works against the source
tree and is less brittle to site URL changes. Also fixes a stale
developers/litefullnode path that pointed to a moved file.
- Strip numeric prefix/suffix from step-style IDs (#step1, tronprotocol#2-x, #x-1)
- Rename IDs that didn't reflect the heading topic (#private_key →
  #key-management, #fullnode-jvm → #mainnet-fullnode-jvm-tuning, etc.)
- Disambiguate duplicate '推荐系统配置' headings with section prefixes
  (#kafka-system-requirements, #mongodb-system-requirements)
- Update all same-file references to match the new anchor IDs
@Benson0224 Benson0224 merged commit 762fa6a into tronprotocol:master May 20, 2026
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