Skip to content

Commit 0b1455b

Browse files
committed
Refactor link conversion scripts by removing obsolete files and updating the source directory configuration. Standardize link formatting in the remaining script for improved clarity and consistency across content.
1 parent 1b9bebf commit 0b1455b

File tree

5 files changed

+25
-393
lines changed

5 files changed

+25
-393
lines changed

.github/workflows/autocorrect.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: AutoCorrect CI
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
autocorrect:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check source code
12+
uses: actions/checkout@v4
13+
14+
- name: AutoCorrect
15+
uses: huacnlee/autocorrect-action@v2
16+
17+
- name: Review Dog
18+
if: failure()
19+
uses: huacnlee/autocorrect-action@v2
20+
env:
21+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
reviewdog: true

convert_link_format.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path');
55

66
// 配置
77
const config = {
8-
sourceDir: './content/learn'
8+
sourceDir: './content/'
99
};
1010

1111
// 转换链接格式
@@ -56,7 +56,7 @@ function processDirectory(dirPath) {
5656
convertedCount += result.converted;
5757
totalCount += result.total;
5858
} else if (item.endsWith('.smd')) {
59-
// 处理smd文件
59+
// 处理 smd 文件
6060
const converted = processFile(fullPath);
6161
if (converted) convertedCount++;
6262
totalCount++;

fix_links.js

Lines changed: 0 additions & 134 deletions
This file was deleted.

fix_links_advanced.js

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)