你瞅啥呢

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 今天部署的时候也遇到这个问题了,还是那句话,多试几次,短时间不行就等一等再部署 ===========

 

posted @   叶乘风  阅读(94)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
点击右上角即可分享
微信分享提示