Skip to content

Commit 5e777e6

Browse files
authored
Merge pull request #9 from tech-notes-hub/feature/add-blog-website
update: quick update md
2 parents 028027d + d19ac89 commit 5e777e6

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ node tools/update-frontmatter.js
8282
node tools/update-frontmatter.js algorithms/sorting-algorithms.md
8383
```
8484

85+
#### Generating Table of Contents
86+
87+
The `generate_summary.py` script automatically creates the SUMMARY.md file:
88+
89+
```bash
90+
# Run the script to generate a new table of contents
91+
python tools/generate_summary.py
92+
```
93+
8594
For more information about available tools, see the [Tools README](tools/README.md).
8695

8796
## 🤝 Contribution

README_vi.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ node tools/update-frontmatter.js
8383
node tools/update-frontmatter.js algorithms/sorting-algorithms.md
8484
```
8585

86+
#### Tạo mục lục tự động
87+
88+
Script `generate_summary.py` tự động tạo file SUMMARY.md:
89+
90+
```bash
91+
# Chạy script để tạo mục lục mới
92+
python tools/generate_summary.py
93+
```
94+
8695
Để biết thêm thông tin về các công cụ có sẵn, hãy xem [README của Tools](tools/README.md).
8796

8897
## 🤝 Đóng góp

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Algorithms
66

77
- [Graph Traversal Algorithms](docs/algorithms/graph-traversal.md)
8+
- [Sorting Algorithms](docs/algorithms/sorting-algorithms.md)
89

910
### Databases
1011

tools/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A Node.js script that automatically updates the frontmatter (metadata) in all Ma
3333

3434
```bash
3535
# Install dependencies if not already installed
36-
npm install gray-matter glob
36+
npm install
3737

3838
# Make the script executable
3939
chmod +x tools/update-frontmatter.js
@@ -55,6 +55,38 @@ node tools/update-frontmatter.js algorithms/sorting-algorithms.md
5555
# - /i18n/vi/algorithms/sorting-algorithms.md
5656
```
5757

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+
5890
#### Automation
5991

6092
This script is configured to run automatically via GitHub Actions when:

0 commit comments

Comments
 (0)