hexo+next修改进度条

版本:hexo3.8.0next6.0.0

启用进度条

找到 blog/themes/next/_config.yml 修改

1
2
pace: true         #false改为true,启用进度条
pace_theme: pace-theme-center-circle #自定义进度条样式,复制上面Themes list中任意一条

更改进度条颜色

找到 blog/themes/next/layout/_partials/head.swig

找到下面代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% if theme.pace %}
{% set pace_css_uri = url_for(theme.vendors._internal + '/pace/'+ theme.pace_theme +'.min.css?v=1.0.2') %}
{% set pace_js_uri = url_for(theme.vendors._internal + '/pace/pace.min.js?v=1.0.2') %}
{% if theme.vendors.pace %}
{% set pace_js_uri = theme.vendors.pace %}
{% endif %}
{% if theme.vendors.pace_css %}
{% set pace_css_uri = theme.vendors.pace_css %}
{% endif %}
<script src="{{ pace_js_uri }}"></script>
<link href="{{ pace_css_uri }}" rel="stylesheet">

---------------添加以下代码修改进度条颜色----------------------------
<style>
.pace .pace-progress {
background: #181f25; /*进度条颜色*/
}

</style>
------------------------------------------------------

{% endif %}
-------------End-------------
梦想总是要有的,万一有人有钱呢?