安装next主题
下载 next主题
1 | cd xxxx/themes |
编辑主题
在hexo/_config.yml
中修改
theme: next
Menu更新
tags:
创建tags页面
hexo new page tags
编辑
tags/index.md
about: 类同于tags页面创建
Social图标修改
在增加的对应的渠道后面加上“|| icons”
icons可以在这里查找
搜索
1、hexo目录下,安装搜索插件npm install hexo-generator-searchdb --save
2、编辑hexo/_config.yml
,添加
1 | # local search |
安装的时候显示:
1 | zlib: Cannot read property 'length' of null |
已解决,详见解决 zlib: Cannot read property 'length' of null
各板块透明度修改
内容板块透明
根博客目录themes\next\source\css\_schemes\Pisces\_layout.styl
文件.content-wrap
标签下background: white
修改为:
background: rgba(255,255,255,0.7); //0.7是透明度
菜单栏背景
根博客目录themes\next\source\css\_schemes\Pisces\_layout.styl
文件.header-inner
标签下background: white
修改为:
background: rgba(255,255,255,0.7); //0.7是透明度
站点概况背景
根博客目录themes\next\source\css\_schemes\Pisces\_sidebar.styl
文件.sidebar-inner
标签下background: white
修改为:
background: rgba(255,255,255,0.7); //0.7是透明度
修改根博客目录themes\next\source\css\_schemes\Pisces\_layout.styl
文件.sidebar
标签下background: $body-bg-color
修改为:
background: rgba(255,255,255,0.7); //0.7是透明度
底部字数显示:
安装插件没有成功,似乎仍然是npm的原因
加入valine在线评论
- 去LeanCloud注册一个帐号.然后再创建一个应用,获取appid 和appkey,
- 在
themes/next/_config.yml
中的valine
中配置
前端显示:Code 504: The app is archived, please restore in console before use.
解决办法:在leancloud的应用里重新激活
邮件提醒
略
语言设置
在根目录_config.yml
设置language: zh-CN
底部跳动图标实现未完成
- 已修改
next\source\css_variables\custom.styl
的css文件,增加以下代码
1 | //底部爱心小图标跳动 |
- 底部为增加对应的ID
修改界面内容默认的设置【没有起效果】
在themes\next\source\css\_custom的custom.styl
添加下面参数
1 | // 屏幕宽度小于1600px |
已解决:
当使用 Mist 和 Muse时候用上面那段话,当使用Pisces 和 Gemini 风格时增加以下内容:
1 | .header{ |
修改背景样式
修改themes\next\source\css\ _custom\custom.styl
文件,这个是Next故意留给用户自己个性化定制一些样式的文件,添加以下代码:
1 | body { |
参数
url:可更换为自己喜欢的图片的地址。
repeat:是否重复出现
attachment:定义背景图片随滚动轴的移动方式
position:设置背景图像的起始位置。
background-size:cover 为可能有助于大分辨率下背景图的显示
背景效果设置:
‘themes\next_config.yml ‘中找到canvas
字体不闪动设置
修改文件next/source/css/_common/components/post/post-reward.styl
,然后注释其中的函数wechat:hover和alipay:hover
,如下:
1 | /* 注释文字闪动函数 |
解决zlib: Cannot read property 'length' of null
用npm安装什么都显示这样,是nodejs版本不够 github issue
stack中的解决方案
方案一:
1 | sudo npm install n -g |
失败,仍旧显示同样错误
方案二:
不使用sudo
step1: 下载 nvm(node version manager)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
step2: 安装最新的node.js版本nvm install stable
取消点击效果
fireworks: false