Skip to content

Commit cc30195

Browse files
committed
feat: update build script to copy entire img directory and add Warp sponsorship to footer
- Modified build script to copy the entire img directory instead of just the favicon. - Added new image file 'warp.png' to the img directory. - Enhanced styles in index.styl for advertisement layout. - Included Warp sponsorship section in the footer template.
1 parent 09afe21 commit cc30195

File tree

6 files changed

+28
-5
lines changed

6 files changed

+28
-5
lines changed

dist/data.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@
932932
"groupmod": {
933933
"n": "groupmod",
934934
"p": "/groupmod",
935-
"d": "更改群组识别码或名称"
935+
"d": "修改系统上的组定义"
936936
},
937937
"groups": {
938938
"n": "groups",
@@ -1704,6 +1704,11 @@
17041704
"p": "/nc",
17051705
"d": "nc是网络工具中的瑞士军刀"
17061706
},
1707+
"ncdu": {
1708+
"n": "ncdu",
1709+
"p": "/ncdu",
1710+
"d": "磁盘使用情况的交互式查看工具,可视为 du 的增强版本"
1711+
},
17071712
"ncftp": {
17081713
"n": "ncftp",
17091714
"p": "/ncftp",
@@ -2094,6 +2099,11 @@
20942099
"p": "/readonly",
20952100
"d": "标记shell变量或函数为只读"
20962101
},
2102+
"realpath": {
2103+
"n": "realpath",
2104+
"p": "/realpath",
2105+
"d": "解析并规范化文件路径,返回绝对路径。"
2106+
},
20972107
"reboot": {
20982108
"n": "reboot",
20992109
"p": "/reboot",

dist/data.min.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

scripts/build.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { create } from 'markdown-to-html-cli';
77
import _ from 'colors-cli/toxic';
88

99
const deployDir = path.resolve(process.cwd(), '.deploy');
10-
const faviconPath = path.resolve(process.cwd(), 'template', 'img', 'favicon.ico');
10+
const templateImgDir = path.resolve(process.cwd(), 'template', 'img');
1111
const rootIndexJSPath = path.resolve(process.cwd(), 'template', 'js', 'index.js');
1212
const dataJsonPath = path.resolve(process.cwd(), 'dist', 'data.json');
1313
const dataJsonMinPath = path.resolve(process.cwd(), 'dist', 'data.min.json');
@@ -18,11 +18,10 @@ const contributorsPath = path.resolve(process.cwd(), 'CONTRIBUTORS.svg');
1818
try {
1919
await FS.ensureDir(deployDir);
2020
await FS.emptyDir(deployDir);
21-
await FS.ensureDir(path.resolve(deployDir, 'img'));
2221
await FS.ensureDir(path.resolve(deployDir, 'js'));
2322
await FS.ensureDir(path.resolve(deployDir, 'css'));
2423
await FS.ensureDir(path.resolve(deployDir, 'c'));
25-
await FS.copySync(faviconPath, path.resolve(deployDir, 'img', 'favicon.ico'));
24+
await FS.copySync(templateImgDir, path.resolve(deployDir, 'img'));
2625

2726
await FS.copyFile(path.resolve(process.cwd(), 'template', 'js', 'copy-to-clipboard.js'), path.resolve(deployDir, 'js', 'copy-to-clipboard.js'));
2827
await FS.copyFile(path.resolve(process.cwd(), 'node_modules/@wcj/dark-mode/main.js'), path.resolve(deployDir, 'js', 'dark-mode.min.js'));

template/img/warp.png

242 KB
Loading

template/styl/index.styl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ mq-mobile = "screen and (max-width: 479px)"
174174
div {
175175
font-size 12px
176176
}
177+
.ad a b {display:block;line-height: 1;}
178+
.ad a {width:160px;}
179+
.ad {
180+
flex-wrap: wrap;
181+
display: inline-flex;
182+
padding-top: 3rem;
183+
gap: 1rem;
184+
}
177185
}
178186
.header.home {
179187
.header_inner {

template/widget/footer.ejs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@
2323
<a target="_blank" href="<%=relative_path%>contributors.html#镜像网站">镜像网站</a>列表,
2424
<a href="https://github.com/jaywcjlove/linux-command/issues/649" target="_blank">推荐</a>自己的镜像网站
2525
</div>
26+
<div class="ad">
27+
<a href="https://go.warp.dev/linux-command">
28+
<img alt="Warp sponsorship" width="160" src="<%=relative_path%>img/warp.png">
29+
<b>Warp, the intelligent terminal for developers!</b>
30+
</a>
31+
</div>
2632
</div>

0 commit comments

Comments
 (0)