2023-06-02 hexo推送至github
第一步:
在你的hexo博客根目录打开终端输入以下命令:
npm install hexo-deployer-git --save
第二步:配置根目录的_config.yml文件:
# URL ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' url: https://你的github名.github.io/ permalink: :year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index: true # Set to false to remove trailing 'index.html' from permalinks trailing_html: true # Set to false to remove trailing '.html' from permalinks ... # Deployment ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: git repository: https://github.com/你的github名/你的github名.github.io.git branch: master
第三步:执行hexo d,该命令会把hexo的public文件推送至github
注意:如果推送的时候报错:
fatal: unable to access 'https://github.com/你的github名/你的github名.github.io.git/': Recv failure: Connection was reset
那么大概率就是网络问题,连接不上github,这时候重新尝试多几次hexo d就行了。
=========== 2023-10-26 今天部署的时候也遇到这个问题了,还是那句话,多试几次,短时间不行就等一等再部署 ===========
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧