hexo d 报错 hexo 安装搜索功能 hexo 报错没有git
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了hexo d 报错 hexo 安装搜索功能 hexo 报错没有git,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2519字,纯文字阅读大概需要4分钟。
内容图文
hexo 部署提交不上,github仓库上文件未更新
大家好,几个月前,我申请了一个域名,然后用hexo生成静态页面并部署到github,参考网上教程,做了我的博客。后来我把Hexo的文件专门备份了,然后电脑系统重装。
现在我写了文章准备再次更新。就重新配置等等,现在本地可以预览,有新文章等等的,但hexo d部署却提交不上github。导致我的网站也就无法更新了。
明明已经把新文章放进post文件了,public文件里也有新文章,本地hexo s,预览也是可以的。自己的域名也是放在source目录下的cname里的。之前都是可以的,现在重新配置就不行了。nothing to commit, working directory clean。。。
这是hexo d之后的显示。
这是根目录下config配置,git和github,https,http,@git什么的都试了。
删除 .deploy_git目录,再执行 hexo d -g就可以了
如果报错 没有master 如下:
root@756242cbe446:/he/blog_source# hexo d INFO Deploying: git INFO Clearing .deploy_git folder... INFO Copying files from public folder... INFO Copying files from extend dirs... On branch master nothing to commit, working tree clean Counting objects: 467, done. Delta compression using up to 2 threads. Compressing objects: 100% (273/273), done. Writing objects: 100% (467/467), 906.27 KiB | 0 bytes/s, done. Total 467 (delta 155), reused 0 (delta 0) remote: Resolving deltas: 100% (155/155), done. remote: Powered by GITEE.COM [GNK-5.0] To gitee.com:horysk/horysk.git + cff865e...ef1f6bc HEAD -> master (forced update) Branch master set up to track remote branch master from git@gitee.com:xxxxxx/xxxx.git. On branch master nothing to commit, working tree clean fatal: 'master' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html Error: Spawn failed at ChildProcess.(/he/blog_source/node_modules/hexo-util/lib/spawn.js:51:21) at ChildProcess.emit (node:events:376:20) at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
把Deployment改为
# Deployment ## Docs: https://hexo.io/docs/deployment.html deploy: type: git repository: git@gitee.com:xxxxx/xxxx.git
hexo 安装搜索功能
npm install hexo-generator-searchdb --save
查看 /themes/next/_config.yml 配置
- 搜索 local_search看看这个下面的enable 是否处于
local_search: enable: true
查看添加配置(这个我个人觉得嘛加和不加没有区别)
- 添加 /themes/next/_config.yml
search: path: search.xml field: post format: html limit: 10000
hexo d 报错 ERROR Deployer not found: git
npm install hexo-deployer-git --save
内容总结
以上是互联网集市为您收集整理的hexo d 报错 hexo 安装搜索功能 hexo 报错没有git全部内容,希望文章能够帮你解决hexo d 报错 hexo 安装搜索功能 hexo 报错没有git所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。