码迷,mamicode.com
首页 > 其他好文 > 详细

Hexo搭建总结

时间:2020-01-21 23:30:00      阅读:112      评论:0      收藏:0      [点我收藏+]

标签:错误记录   文章   sina   多说评论   could not   shu   iss   iis   nod   


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文件

将上述文件添加配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Host github.com    /服务器地址为github地址/
User "XXX@XX.com" /github上的注册邮箱 为用户账号/
Hostname ssh.github.com /服务器地址为github地址/
PreferredAuthentications pu 大专栏  Hexo搭建总结blickey /采用公匙/
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

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

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

还有主配置文件中:

1
2
3
4
5
6
7
8
9
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

注意ssh文件的配置C:Usersyangyang.ssh

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

Hexo搭建总结

标签:错误记录   文章   sina   多说评论   could not   shu   iss   iis   nod   

原文地址:https://www.cnblogs.com/lijianming180/p/12227122.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!