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)) { if (fs.existsSync(source)) {
fs.copyFileSync(source, destination); fs.copyFileSync(source, destination);
console.log(`Copied README.md from ${source} to ${destination}`); console.log(`Copied file from ${source} to ${destination}`);
} else { } 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 文件到当前目录 // 拷贝 ../README.md 文件到当前目录
const readmeSource = path.join(process.cwd(), '../README.md'); const readmeSource = path.join(process.cwd(), '../README.md');
const readmeDestination = path.join(docsDir, 'index.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) { for (const issue of issues) {
// 仅处理包含 "文档" 标签的 issue // 仅处理包含 "文档" 标签的 issue

View File

@ -73,6 +73,6 @@ function sendDebugCmd() {
</body> </body>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
</html> </html>

View File

@ -26,7 +26,7 @@
<body class="index_page"> <body class="index_page">
<div class="player"> <div class="player">
<h1>小爱音箱播放器 <h1>小爱音箱播放器
<a id="version" href="https://github.com/hanxi/xiaomusic/blob/main/CHANGELOG.md" target="_blank">版本 <a id="version" href="https://xdocs.hanxi.cc/issues/changelog.md" target="_blank">版本
1.0.0</a><span id="versionnew" class="new-badge"></span> 1.0.0</a><span id="versionnew" class="new-badge"></span>
</h1> </h1>

View File

@ -72,7 +72,7 @@ function convertToJSON() {
<textarea id="json-output" rows="10" cols="50" placeholder="转换后的JSON..."></textarea> <textarea id="json-output" rows="10" cols="50" placeholder="转换后的JSON..."></textarea>
</body> </body>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
</html> </html>

View File

@ -31,9 +31,7 @@ var vConsole = new window.VConsole();
</head> </head>
<body> <body>
<h2>小爱音箱设置面板 <h2>小爱音箱设置面板
(<a id="version" href="https://github.com/hanxi/xiaomusic/blob/main/CHANGELOG.md"> (<a id="version" href="https://xdocs.hanxi.cc/issues/changelog.md">版本未知</a>)
版本未知
</a>)
</h2> </h2>
<hr> <hr>
@ -271,7 +269,7 @@ var vConsole = new window.VConsole();
<img class="qrcode" src="./qrcode.png" alt="请涵曦喝奶茶🧋"> <img class="qrcode" src="./qrcode.png" alt="请涵曦喝奶茶🧋">
</div> </div>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -69,6 +69,6 @@ function sendDebugCmd() {
</body> </body>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
</html> </html>

View File

@ -30,7 +30,7 @@ var vConsole = new window.VConsole();
</head> </head>
<body> <body>
<h2>小爱音箱操控面板 <h2>小爱音箱操控面板
(<a id="version" href="https://github.com/hanxi/xiaomusic/blob/main/CHANGELOG.md">版本未知</a>) (<a id="version" href="https://xdocs.hanxi.cc/issues/changelog.md">版本未知</a>)
<span id="versionnew" class="blink"></span> <span id="versionnew" class="blink"></span>
</h2> </h2>
<hr> <hr>
@ -95,7 +95,7 @@ var vConsole = new window.VConsole();
</div> </div>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
<dialog id="valid-host"> <dialog id="valid-host">
<form method="dialog"> <form method="dialog">

View File

@ -72,7 +72,7 @@ function convertToJSON() {
<textarea id="json-output" rows="10" cols="50" placeholder="转换后的JSON..."></textarea> <textarea id="json-output" rows="10" cols="50" placeholder="转换后的JSON..."></textarea>
</body> </body>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
</html> </html>

View File

@ -30,9 +30,7 @@ var vConsole = new window.VConsole();
</head> </head>
<body> <body>
<h2>小爱音箱设置面板 <h2>小爱音箱设置面板
(<a id="version" href="https://github.com/hanxi/xiaomusic/blob/main/CHANGELOG.md"> (<a id="version" href="https://xdocs.hanxi.cc/issues/changelog.md">版本未知</a>)
版本未知
</a>)
</h2> </h2>
<hr> <hr>
@ -266,7 +264,7 @@ var vConsole = new window.VConsole();
<img class="qrcode" src="./qrcode.png" alt="请涵曦喝奶茶🧋"> <img class="qrcode" src="./qrcode.png" alt="请涵曦喝奶茶🧋">
</div> </div>
<footer> <footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p> <p>Powered by <a href="https://xdocs.hanxi.cc" target="_blank">XiaoMusic</a></p>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -73,7 +73,7 @@
</div> </div>
</div> </div>
<footer> <footer>
Powered by <a href="https://github.com/hanxi/xiaomusic">XiaoMusic</a> Powered by <a href="https://xdocs.hanxi.cc">XiaoMusic</a>
</footer> </footer>
<style> <style>
@font-face { @font-face {