Hexo搭建总结


Hexo搭建过程记录

1.Hexo基本环境搭建

1.Hexo安装前提

Node.js和Git,他们的安装方法可以自行百度。

2.具体安装步骤可以参考:

https://www.cnblogs.com/visugar/p/6821777.html

跟着上面的步骤,如果不出错基本的Hexo就以及搭建成功了。

同时可以同时参考下面的文章:

https://www.jianshu.com/p/465830080ea9

https://zhuanlan.zhihu.com/p/22191919?refer=crossin

http://baixin.io/2015/08/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/

3.关于Hexo的详细介绍可以参考:

https://hexo.io/zh-cn/

Hexo中文文档。

4.Next主题介绍和配置

http://theme-next.iissnan.com/

https://www.cnblogs.com/debugzer0/articles/5461804.html

https://www.cnblogs.com/syd192/p/6074323.html

2.Hexo配置错误记录

1.Hexo常见问题解决方案:

https://xuanwo.org/2014/08/14/hexo-usual-problem/

2.ssh: connect to host github.com port 22: Connection timed out或者hexo deploy无显示:

提示这个错误时候,我们要修改.ssh目录下文件。

进入.ssh下面,修改ssh配置,新建config文件

将上述文件添加配置:

Host github.com    /服务器地址为github地址/
User "XXX@XX.com"  /github上的注册邮箱 为用户账号/
Hostname ssh.github.com   /服务器地址为github地址/
PreferredAuthentications publickey  /采用公匙/
IdentityFile ~/.ssh/id_rsa    /公匙文件路径/
Port 443                           /修改端口为443/

--例如

Host github.com  
User fulinux@sina.com  
Hostname ssh.github.com  
PreferredAuthentications publickey  
IdentityFile ~/.ssh/id_rsa  
Port 443  

可用不懂参考文章:https://www.jianshu.com/p/df3edc4286d2

3.还有一个常见错误could not read Username for ‘https://github.com‘:

配置文件中:和后面字母间空一格。

还有主配置文件中:

deploy:
  type: git
  repo: git@github.com:yangyang1900/yangyang1900.github.io.git
  branch: master
--或者
deploy:
  type: git
  repo: https://github.com/yourname/yourname.github.io.git
  branch: master
3.Hexo常用扩展

1.Hexo博客添加SEO、评论系统、阅读统计和站长统计:

http://visugar.com/2017/08/01/20170801HexoPlugins/

2.使用Hexo时,如果更换了电脑怎么更新博客?

https://www.zhihu.com/question/21193762

3.Hexo安装主题、安装多说评论框、购买域名并绑定域名:

https://zhuanlan.zhihu.com/p/22498474

还可以同时阅读:https://zhuanlan.zhihu.com/p/22745430

https://www.cnblogs.com/zhcncn/p/4097881.html

4.让文章只显示一部分和阅读全文按钮:

在文章中加一个 <!--more--><!--more--> 后面的内容就不会显示出来了。

也可以通过配置文件设置同样效果:https://www.jianshu.com/p/393d067dba8d

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值