2024.05.29
本文介绍用Cloudflare搭建图床,配合PicGo+Typora实现图片自动上传,并启用增强搜索插件,解决图片管理与搜索难题。
1.Telegraph-Image/2.图床/3.vuepress/4.github删除历史分支
1、通过cloudflare搭建免费图床
2、通过picgo+typora自动上传图片

3、启用增强搜索插件
pnpm add -D vuepress-plugin-search-pro
pnpm add -D nodejs-jiebaimport { cut } from "nodejs-jieba";
//...
plugins: {
blog: true,
//...
searchPro: {
// 索引全部内容
indexContent: true,
indexOptions: {
// 使用 nodejs-jieba 进行分词
tokenize: (text, fieldName) =>
fieldName === "id" ? [text] : cut(text, true),
},
},
//...
},
//...4、github 删除历史分支
1、创建并切换到lastest_branch分支
git checkout --orphan latest_branch2、添加所有文件
git add -A3、提交更改
git commit -am "删除历史版本记录,初始化仓库"4、删除分支
git branch -D master5、将当前分支重命名
git branch -m master6、强制更新存储库
git push -f origin master