hexo d 报错 hexo 安装搜索功能 hexo 报错没有git

60 篇文章 2 订阅
22 篇文章 1 订阅

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.<anonymous> (/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
 
  1. search:
    
        path: search.xml
    
        field: post
    
        format: html
    
        limit: 10000

hexo  d  报错   ERROR Deployer not found: git

npm install hexo-deployer-git --save

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值