Skip to content

Commit 0be2cf4

Browse files
refactor: migrate tutorial/ + codes_and_assets/ to documents/ + code/
- Move all tutorial content (135 md files) to documents/ with ASCII directory names - Move all code examples to code/ with renamed subdirectories - Update mkdocs.yml docs_dir, pre-commit patterns, CI workflow, and scripts - Fix 138 snippet references and 80 internal chapter links - Add CSS fix for top navigation tab wrapping
1 parent 0fcc5d6 commit 0be2cf4

480 files changed

Lines changed: 302 additions & 288 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
with:
2424
config: '.markdownlint.json'
2525
globs: |
26-
tutorial/**/*.md
27-
!tutorial/**/index.md
26+
documents/**/*.md
27+
!documents/**/index.md
2828
2929
validate-frontmatter:
3030
name: Validate Frontmatter

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ repos:
99
hooks:
1010
- id: markdownlint
1111
args: ['--config', '.markdownlint.json']
12-
files: '^tutorial/.*\.md$'
13-
exclude: '^tutorial/.*\bindex\.md$'
12+
files: '^documents/.*\.md$'
13+
exclude: '^documents/.*\bindex\.md$'
1414

1515
# Frontmatter validation (local hook)
1616
- repo: local
@@ -19,7 +19,8 @@ repos:
1919
name: Validate article frontmatter
2020
entry: scripts/validate_frontmatter.py
2121
language: python
22-
files: '^tutorial/核心:现代嵌入式C++教程/.*\.md$'
22+
additional_dependencies: ['pyyaml']
23+
files: '^documents/core-embedded-cpp/.*\.md$'
2324
exclude: '(index\.md|tags\.md)$'
2425
pass_filenames: false
2526

@@ -31,6 +32,6 @@ repos:
3132
args: ['--maxkb=1000']
3233
- id: end-of-file-fixer
3334
- id: trailing-whitespace
34-
files: '^tutorial/.*\.md$'
35+
files: '^documents/.*\.md$'
3536
- id: check-yaml
3637
files: '^\.github/.*\.ya?ml$'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion

README.md

Lines changed: 7 additions & 7 deletions
Lines changed: 3 additions & 3 deletions

codes_and_assets/examples/chapter02/01_zero_overhead/CMakeLists.txt renamed to code/examples/chapter02/01_zero_overhead/CMakeLists.txt

File renamed without changes.

codes_and_assets/examples/chapter02/01_zero_overhead/README.md renamed to code/examples/chapter02/01_zero_overhead/README.md

codes_and_assets/examples/chapter02/01_zero_overhead/constexpr_example.cpp renamed to code/examples/chapter02/01_zero_overhead/constexpr_example.cpp

File renamed without changes.

codes_and_assets/examples/chapter02/01_zero_overhead/gpio_example.cpp renamed to code/examples/chapter02/01_zero_overhead/gpio_example.cpp

File renamed without changes.

codes_and_assets/examples/chapter02/01_zero_overhead/inline_vs_macro.cpp renamed to code/examples/chapter02/01_zero_overhead/inline_vs_macro.cpp

File renamed without changes.

0 commit comments

Comments
 (0)