快捷菜单
常用功能一站直达
更多功能请点顶栏「快捷菜单」

刺激
自己写的。
自己开源的 《vuepress-theme-vdoing-one-public》网站模板。
此模板是在Young Kbt blog的开源项目《Kele-Bingtang.github.io》基础上修改为自己的风格而成,感谢大佬开源的模板&感谢原作者开源的vdoing主题。❤️❤️
NOTE
你想一键推送自己本地知识库更新内容到网站吗?
行的话,只需要粘贴执行以下脚本就好。😂
拉取仓库后在vscode里需要做的配置:
拉取项目后,直接在vscode里执行如下代码就好:
1cat >>/etc/profile <<EOF
2alias nd="
3sh -x /d/vuepress-theme-vdoing-one-private/shell/vdoing-run-dev.sh
4"
5EOF
6
7cat >>/etc/profile <<EOF
8alias nb="
9sh -x /d/vuepress-theme-vdoing-one-private/shell/vdoing-run-build.sh
10"
11EOF
12
13
14cat >>/etc/profile <<EOF
15alias xyy="
16sh -x /d/vuepress-theme-vdoing-one-private/shell/vdoing.sh
17"
18EOF
19
20
21cat >>/etc/profile <<EOF
22alias gs="
23cd /d/vuepress-theme-vdoing-one-private/
24git status
25"
26EOF
27
28
29cat >>/etc/profile <<EOF
30alias gp="
31cd /d/vuepress-theme-vdoing-one-private/
32git pull
33"
34EOF
35
36
37cat >>/etc/profile <<EOF
38alias gg="
39cd /d/vuepress-theme-vdoing-one-private/
40git status
41git pull
42git add -A
43git commit -m'commit data'
44git push
45git status
46"
47EOF
48
49source /etc/profile案例:shell脚本一键完成vdoing-提交+构建+推送工作流
2024年12月23日测试
基于官方https://github.com/xugaoyi/vuepress-theme-vdoing搭建的仓库。

D:\vuepress-theme-vdoing-one\shell\vdoing.sh

1#!/bin/bash
2
3#提交
4cd /d/vuepress-theme-vdoing-one
5git pull
6git add -A
7git commit -m"update data"
8git push
9
10#构建
11cd /d/vuepress-theme-vdoing-one
12npm run build:win
13
14
15echo "推送winodws site数据到ecs:"
16/d/vuepress-theme-vdoing-one/shell/vdoing.bat
17echo "rsync: rsync数据winodws-->ecs推送成功!"
18echo ""
19echo ""D:\vuepress-theme-vdoing-one\shell\vdoing.bat
1::添加自己要执行的任务
2echo Push winodws docusaurus static data to ecs...
3rsync.exe -avPzruh --delete --port 8730 --password-file=/cygdrive/D/docusaurus/resource/shell/password.txt /cygdrive/D/vuepress-theme-vdoing-one/docs/.vuepress/dist root@云服务器ip::cmi-vue/自己vscode配置:
1cat >>/etc/profile <<EOF
2alias xyy="
3sh -x /d/vuepress-theme-vdoing-one/shell/vdoing.sh
4"
5EOF
6
7source /etc/profile

xyy命令


之前新增的内容出现了:(完美😜)

nd
nb
😜
shell代码
1cat >>/d/vuepress-theme-vdoing-one/shell/vdoing-run-dev.sh <<EOF
2cd /d/vuepress-theme-vdoing-one/
3npm run dev:win
4"
5EOF
6
7cat >>/etc/profile <<EOF
8alias nd="
9sh -x /d/vuepress-theme-vdoing-one/shell/vdoing-run-dev.sh
10"
11EOF
12
13source /etc/profile
14
15
16
17
18cat >>/d/vuepress-theme-vdoing-one/shell/vdoing-run-build.sh <<EOF
19cd /d/vuepress-theme-vdoing-one/
20npm run build:win
21"
22EOF
23
24cat >>/etc/profile <<EOF
25alias nb="
26sh -x /d/vuepress-theme-vdoing-one/shell/vdoing-run-build.sh
27"
28EOF
29
30source /etc/profile
测试效果


完美。😜
日历 · 精选 · 友链 · 更多
如果内容对你有帮助,欢迎请我喝杯咖啡 ☕



One的公众号
爱折腾博客的小白