Hexo博客NexT主题添加theme-next-canvas-nest几何动效
步骤一 进入NexT文件目录
$ cd themes/next
步骤二 下载canvas-nest
我们把canvas-nest下载到next目录下的ource/lib目录里
$ git clone https://github.com/theme-next/theme-next-canvas-nest source/lib/canvas-nest
步骤三 配置
在NexT配置文件_config.yml中配置开启
canvas_nest
在配置文件中找到canvas_nest,将enable设置成true,还可以自定义颜色、透明度、数量等。
canvas_nest:
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
更新
$ cd themes/next/source/lib/canvas-nest
$ git pull
效果
$ hexo d -g重新编译部署下就可以看到效果了,可以到我的个人博客野猿新一看下效果
canvas_nest GitHub主页
详细说明可以到canvas_nest主页theme-next/theme-next-canvas-nest查看