chore: update changelog

This commit is contained in:
canisminor1990
2026-01-27 11:51:12 +08:00
parent 8485cbec47
commit 2c43f14254
14 changed files with 33335 additions and 31367 deletions

View File

@@ -176,20 +176,26 @@ class ImageCDNUploader {
let count = 0;
changelogIndex.community = changelogIndex.community.map((post) => {
if (!post.image) return post;
count++;
return {
...post,
image: this.cache[post.image] || post.image,
};
if (this.cache[post.image]) {
count++;
return {
...post,
image: this.cache[post.image],
};
}
return post;
});
changelogIndex.cloud = changelogIndex.cloud.map((post) => {
if (!post.image) return post;
count++;
return {
...post,
image: this.cache[post.image] || post.image,
};
if (this.cache[post.image]) {
count++;
return {
...post,
image: this.cache[post.image],
};
}
return post;
});
writeJSONSync(changelogIndexPath, changelogIndex, { spaces: 2 });
@@ -210,6 +216,10 @@ class ImageCDNUploader {
} else {
consola.info('No new images to upload.');
}
// 替换文章和 changelog index 中的图片链接
this.replaceLinksInPosts();
this.replaceLinksInChangelogIndex();
}
}

View File

@@ -5,7 +5,8 @@ export const DOCS_DIR = resolve(ROOT, 'docs/changelog');
export const CHANGELOG_DIR = resolve(ROOT, 'changelog');
export const CHANGELOG_FILE = {
v0: resolve(CHANGELOG_DIR, 'CHANGELOG.v0.md'),
v1: resolve(ROOT, 'CHANGELOG.md'),
v1: resolve(CHANGELOG_DIR, 'CHANGELOG.v1.md'),
v2: resolve(ROOT, 'CHANGELOG.md'),
};
export const STATICS_DIR = resolve(DOCS_DIR, '__statics__');
export const CHANGELOG_INDEX = resolve(DOCS_DIR, 'index.json');