前言
- Hexo版本:4.2.0
- NexT版本:7.7.1
- NexT中集成有canvas_nest插件
- GitHub:theme-next-canvas-nest
- canvas-nest特效展示
安装部署
1)配置NexT主题配置文件themes/next/_config.yml
a)开启canvas_nest
# Canvas-nest
# Dependencies: https://github.com/theme-next/theme-next-canvas-nest
# For more information: https://github.com/hustcc/canvas-nest.js
# 若要开启canvas_nest,除了此处设置成true,还需要设置canvas_nest的vendors提供商
canvas_nest:
#enable: false
enable: true
onmobile: true # Display on mobile or not
color: "0,0,255" # RGB values, use `,` to separate
opacity: 0.5 # The opacity of line: 0~1
zIndex: -1 # z-index property of the background
count: 99 # The number of lines
b)设置canvas_nest脚本来源:在配置文件vendors选项下取消canvas_nest cdn注释
# Internal version: 1.0.0
# 设置canvas_nest的来源
canvas_nest: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@1/canvas-nest.min.js
canvas_nest_nomobile: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@1/canvas-nest-nomobile.min.js
# canvas_nest:
# canvas_nest_nomobile: