1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-13 15:58:13 +08:00

docs: 修改链接

This commit is contained in:
涵曦
2024-12-13 20:23:02 +08:00
parent 92ed00f7cc
commit 96083bee89
10 changed files with 21 additions and 20 deletions

View File

@@ -126,12 +126,12 @@ function clearDirectory(dir: string) {
}
}
function copyReadmeFile(source: string, destination: string) {
function copyFile(source: string, destination: string) {
if (fs.existsSync(source)) {
fs.copyFileSync(source, destination);
console.log(`Copied README.md from ${source} to ${destination}`);
console.log(`Copied file from ${source} to ${destination}`);
} else {
console.error(`README.md not found at ${source}`);
console.error(`file not found at ${source}`);
}
}
@@ -176,7 +176,12 @@ export default function GitHubIssuesPlugin(options: GitHubIssuesPluginOptions):
// 拷贝 ../README.md 文件到当前目录
const readmeSource = path.join(process.cwd(), '../README.md');
const readmeDestination = path.join(docsDir, 'index.md');
copyReadmeFile(readmeSource, readmeDestination);
copyFile(readmeSource, readmeDestination);
// 拷贝 ../CHANGELOG.md 文件到当前目录
const changelogSource = path.join(process.cwd(), '../CHANGELOG.md');
const changelogDestination = path.join(docsDir, 'changelog.md');
copyFile(changelogSource, changelogDestination);
for (const issue of issues) {
// 仅处理包含 "文档" 标签的 issue