fix: upgrade heading levels in common dev templates (zh+en)#1707
Merged
Milir-Radxa merged 3 commits intoradxa-docs:mainfrom Apr 20, 2026
Merged
Conversation
Fix 0.x numbering issue caused by headings starting at ### without a parent ##. Upgraded all affected templates by one heading level. Changes: - common/dev/_canbus.mdx: CANBUS 简介 → ##, ### → ## - common/dev/_gpio.mdx: ### → ##, #### → ### - common/dev/_i2c.mdx: ### → ## - common/dev/_pwm.mdx: ### → ## - common/dev/_spi.mdx: ### → ## - common/dev/_uart.mdx: ### → ##, #### → ### - common/dev/_w1.mdx: ### → ## - common/dev/_pico-*.mdx: #####/####/### → ####/###/## - i18n/en/.../common/dev/: same changes applied to English versions Fixes rendering of tutorial pages like zero/zero3/app-development/canbus where first content heading showed 0.x instead of 1.x
Round 2 fixes from review: - Fix level jumping (## → ####) in pico template subsections - Align English templates to match Chinese heading levels - Fix _canbus.mdx intro (revert to plain text to match English template) Files modified (17): - docs/common/dev/_canbus.mdx, _gpio.mdx, _i2c.mdx, _pwm.mdx, _spi.mdx, _uart.mdx, _w1.mdx - docs/common/dev/_pico-*.mdx (8 files) - i18n/en/.../common/dev/: corresponding English templates (matching changes)
Round 3: remove manually-written sequential numbers (1. 2. 3. etc.) from headings, since Docusaurus auto-numbers them. Also fix _pico-fan.mdx heading level (### 风扇 → ## 风扇, #### → ###). Files modified (13): - docs/common/dev/_pico-*.mdx (6 files): remove N. prefixes from headings - docs/common/dev/_pico-fan.mdx: restructure heading levels - i18n/en/.../common/dev/: same changes for English versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix 0.x numbering issue in tutorial pages caused by content headings starting at
###without a parent##. When a Docusaurus page's first heading is###, the auto-numbering plugin treats it as section 0, displaying0.xinstead of1.x.Changes
Two rounds of fixes:
Round 1: Fix first-heading 0.x issue
Upgraded all affected common dev templates by one heading level.
_canbus.mdx##; all###→##_gpio.mdx,_i2c.mdx,_pwm.mdx,_spi.mdx,_w1.mdx###→##_uart.mdx###→##;####→###_pico-*.mdx(8 files)Round 2: Fix subsection level jumping (review fix)
##→####jumping in pico template subsections (####→###)Example Fix
Before (page zero/zero3/app-development/canbus):
### 准备(no parent##), displayed as0.1 准备After:
## CANBUS 简介(parent), displayed as1 CANBUS 简介###headings correctly display as1.1,1.2, etc.Files Modified
Chinese templates (
docs/common/dev/): 17 filesEnglish templates (
i18n/en/.../common/dev/): 14 files matchingTotal: 31 files changed (144 insertions, 144 deletions across 2 commits)