avatar
文章
55
标签
22
分类
3
主页
博文
  • 分类
  • 标签
  • 归档
wiki
友链
开往
Diraw的世界
搜索
主页
博文
  • 分类
  • 标签
  • 归档
wiki
友链
开往

Diraw的世界

Butterfly魔改3:修改副标题字体大小
发表于2025-01-03|计算机| 条评论
前言众所周知,Butterfly在可以在 _config.yml 中用 font 配置全局的字体和代码大小,如下图所示: # Global font settings# Don't modify the following settings unless you know how they workfont: global_font_size: 16px code_font_size: 16px font_family: code_font_family:# Font settings for the site title and site subtitleblog_title_font: font_link: font_family: 但是一些更精细的调整就没有了。就比如我把全局大小设置成16px之后,我感觉我首页的副标题的中文字体有点大了,我想改小一点。 步骤在 \themes\butterfly\layout\includes\header\index.pug 中搜索 site-subtitle 可以找到: #site-subtitle ...
Butterfly魔改2:页面渐变切换
发表于2025-01-03|计算机| 条评论
准备工作这边使用Pjax来实现页面的动画。Butterfly内置了Pjax插件,直接在 /themes/butterfly/_config.yml 中搜索Pjax,然后把 enable 选项改成 true,如下所示: # https://github.com/MoOx/pjaxpjax: enable: true # Exclude the specified pages from pjax, such as '/music/' exclude: # - /xxxxxx/ 步骤首先,在 /themes/butterfly/source/css 下创建 custom.css 写入如下代码: /* 默认(白天模式) */body { background-color: white; color: black;}[data-theme="dark"] body { background-color: #121212; color: white;}.pjax-leave-active { opacity: 0; background-color:...
Butterfly魔改1:首页大图预加载
发表于2025-01-03|计算机| 条评论
前言众所周知,Butterfly的首页大图可以通过在 _config.yml 文件中中配置 index_img 选项来实现。 但是如果你用的是GitHub Pages来部署的,而你配置的首页大图的大小又有好几M,不算太小的话,有时候访问网站就会出现——先加载Butterfly框架出来,此时首页大图是蓝色的默认背景,然后才逐渐把你配置的大图加载出来——的这种情况。 我不喜欢这种情况,因为我希望别人一进网站就被我的首页大图震撼(bushi),如果图片是慢慢加载出来的话就没有那种震撼感了,甚至说体验感比较一般。所以我准备对Butterfly的源码魔改一波。 以下是Butterfly官方网站的加载情况,可以看到这个图片逐渐加载的现象: 方法1现在我们来魔改一下源代码,以实现图片预加载的功能。 打开 themes/butterfly/layout/includes/layout.pug 这个文件,在 body 的最前面添加如下代码: body(style="visibility: hidden; overflow: hidden;") ...
Hexo报错ssh: connect to host github.com port 22: Connection timed out解决办法
发表于2025-01-03|计算机| 条评论
hexo d 报错ssh: connect to host github.com port 22: Connection timed out ssh: connect to host github.com port 22: Connection timed outfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.htmlError: Spawn failed at ChildProcess.<anonymous>...
Butterfly报错TypeError: coverVal.indexOf is not a function解决办法
发表于2025-01-02|计算机| 条评论
魔改了一下Butterfly的源代码之后 hexo g 出现如下报错: TypeError: coverVal.indexOf is not a function at Hexo.<anonymous> (E:\Blog\themes\butterfly\scripts\filters\random_cover.js:15:30) at Hexo.tryCatcher (E:\Blog\node_modules\bluebird\js\release\util.js:16:23) at Hexo.<anonymous> (E:\Blog\node_modules\bluebird\js\release\method.js:15:34) at E:\Blog\node_modules\hexo\dist\extend\filter.js:58:67 at tryCatcher (E:\Blog\node_modules\bluebird\js\release\util.js:16:23) at...
1…56
avatar
Diraw
希望能构建心中的一片圣地
文章
55
标签
22
分类
3
Follow Me
公告

所有知识整理类博文已全部移动至wiki文档

其他站点
资料分享
云盘服务
词源文档
最新文章
使用Tailscale对多台服务器进行内部组网并进行流量转发2025-10-14
在debian服务器上搭建syncthing中转2025-10-06
使用diskpart格式化u盘2025-10-06
分类
  • 生活3
  • 英语2
  • 计算机50
标签
linux8ubuntu8vscode3Hexo18cuda1windows8powershell1注册表2c++1git4ssh3github2服务器11webdav1obsidian1debian6cloudreve1python1记录3Butterfly14wsl1英语2
网站信息
文章数目 :
55
本站总字数 :
38.7k
本站访客数 :
本站总浏览量 :
最后更新时间 :
©2025 By Diraw
框架 Hexo|主题 Butterfly
蜀ICP备2025147634号-1
载入天数...载入时分...
搜索
数据加载中