@@ -33,7 +33,7 @@ A Node.js script that automatically updates the frontmatter (metadata) in all Ma
33
33
34
34
``` bash
35
35
# Install dependencies if not already installed
36
- npm install gray-matter glob
36
+ npm install
37
37
38
38
# Make the script executable
39
39
chmod +x tools/update-frontmatter.js
@@ -55,6 +55,38 @@ node tools/update-frontmatter.js algorithms/sorting-algorithms.md
55
55
# - /i18n/vi/algorithms/sorting-algorithms.md
56
56
```
57
57
58
+ ### ` generate_summary.py `
59
+
60
+ A Python script that automatically generates the ` SUMMARY.md ` file by scanning the ` docs/ ` directory structure.
61
+
62
+ #### Features
63
+
64
+ - Creates a well-structured table of contents
65
+ - Extracts titles from Markdown files when available
66
+ - Organizes content by categories based on directory structure
67
+ - Generates clean, formatted links to all documentation files
68
+
69
+ #### Requirements
70
+
71
+ - Python 3.6+
72
+ - No external dependencies (uses only standard library)
73
+
74
+ #### Usage
75
+
76
+ ``` bash
77
+ # Make the script executable (first time only)
78
+ chmod +x tools/generate_summary.py
79
+
80
+ # Run the script to generate SUMMARY.md
81
+ python tools/generate_summary.py
82
+ ```
83
+
84
+ The script will:
85
+ 1 . Scan all directories in ` /docs `
86
+ 2 . Extract titles from Markdown files or generate them from filenames
87
+ 3 . Create a hierarchical table of contents
88
+ 4 . Write the result to ` SUMMARY.md ` in the project root
89
+
58
90
#### Automation
59
91
60
92
This script is configured to run automatically via GitHub Actions when:
0 commit comments