博客(一)

首页加载空白

在我不断的调试修改之后,部署上GitHub的代码显示的是空白首页,但是其他页面依旧。然后我本地运行了一下,发现也是这样的情况,于时我去网上搜了一些教程,都是说将source/vendors改成source/lib,我去该目录下看已经被改过来了,那说明就不是这个问题,我在这个问题上纠结了好久,终于决定删除node_modules文件夹,然后重新在该目录下npm i生成所有依赖文件,再次打开时,发现问题解决。

部署的时候出现错误

我在部署的时候出现了以下未标红的错误:

1
2
3
4
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed

我尝试了用原始git方法上传,但还是不行,于是我又去百度了以下,这个的意思就是

1
2
3
4
5
6
7
致命:远程端意外挂起

致命:远程端意外挂起

致命的东西是错的。也许你可以在这里找到解决办法:

错误:生成失败

然后我上网查了一下,出现这种情况的原因就是网速不好!!!!所以只要再尝试上传几次就可以成功的!!!!

底部标签显示不正常

底部下一页标签显示的时<i class="fa fa-angle-right"></i>
\themes\next\layout\_partials\pagination.swig中,

1
2
3
4
5
6
7
8
9
10
11
{% if page.prev or page.next %}
<nav class="pagination">
{{
paginator({
prev_text: '<i class="fa fa-angle-left"></i>',
next_text: '<i class="fa fa-angle-right"></i>',
mid_size: 1
})
}}
</nav>
{% endif %}

修改为:

1
2
3
4
5
6
7
8
9
10
11
12
{%- if page.prev or page.next %}
<nav class="pagination">
{{
paginator({
prev_text: '<i class="fa fa-hand-o-left" aria-label="' + __('accessibility.prev_page') + '"></i>',
next_text: '<i class="fa fa-hand-o-right" aria-label="' + __('accessibility.next_page') + '"></i>',
mid_size : 1,
escape : false
})
}}
</nav>
{%- endif %}

其中:fa-angle-right为图标样式,可以自己改为自己喜欢的,去这里

修改侧边栏背景图

打开themes/next/source/css/_custom/custom.styl,在里面新增如下代码:

1
2
3
.site-meta {
background: $blue; //天空的颜色,和我的眼镜是绝配
}

端口被占用

提示“FATAL Port 4000 has been used. Try other port instead.”
解决办法:

1
$hexo s -p 5000
-------------本文结束感谢您的阅读-------------