None

2025

08-16

之前为了方便都是在vscode上看文章,后来网页查看才发现mathjax竟然很多不加载,本来以为格式问题,因为也有正常加载的,但是改半天没效果,终于去查才得知是markdown引擎的问题,有更换的想法但是都半途而废了,只添了个hexo-filter-mathjax还不知道有没有用,也不是没考虑过hexo-renderer-pandoc,到底有畏难心理,一时搞不定就回退了……很怕缠在这种事情上,甚至宁愿以后减少数学公式的使用。

安装 pandoc 可以参考下文
Hexo 构建 blog 时渲染 LaTeX 数学公式的问题
彻底解决 Hexo 的数学公式渲染问题

此外发现页面有点窄,导致代码过长需要拖动,可参考宽度设置修改页面宽度
由于宽度调整导致侧边栏随之拉伸显得比较难看,同文件中可修改 & > div:first-child 部分调整比例

1
2
3
& > div:first-child
width: 78%
transition: all .3s

也可以选择固定侧边栏宽度

1
2
.layout > aside
flex: 0 0 300px

因侧边栏的挤压,重心偏左,看起来不是很舒服,可修改margin调整布局,移动端会覆盖不用多虑兼容性,不推荐修改padding,其实质是在压缩原文章框架空间

1
2
3
4
5
6
7
.layout
display: flex
flex: 1 auto
margin: 0 auto 0 17%
padding: 20px 10px
max-width: 1250px
width: 100%

bilibili内嵌视频

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<style>
.aspect-ratio {
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 高宽比 */
overflow: hidden;
}
.aspect-ratio iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>

<div class="aspect-ratio">
<iframe
src="https://player.bilibili.com/player.html?bvid=BV19RtxzUE53&page=1&as_wide=1&high_quality=1&danmaku=0"
scrolling="no" border="0" frameborder="0" allowfullscreen="true">
</iframe>
</div>

08-11

删减、合并文章,删除git deploy以清空commit(竟然直接删就行……),删除部分css、js
hexo 删除 git commit 历史

07-29

因长篇笼统,看着费劲,独立篇章
后悔浪费时间搞美化了,现在就想着怎么多写一点,怎么节省内存,想把css去了……

07-28

修改文章格式并增添参考链接

07-23

才发现移动端aplayer有点大,考虑过还留不留,到底舍弃不了

常态缩进aplayer

1
2
3
4
5
6
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body
left: -66px !important
transition: left 0.3s ease !important

.aplayer.aplayer-fixed.aplayer-narrow.expanded .aplayer-body
left: 0 !important

07-21

这几天看了这么多美化,不应该,应该想想到底为了什么,我的初心就是搭一个自己的网站能随便写点东西,有人看也好没人看也罢。美化当然好,但远没有想象得需要。

07-20

发现hexo g -d会在github上commits一次,以前不知道本地hexo s,各种魔改后报错修改正文还没怎么写commits都200条了。
试过强制推送刷新,但是绑定了hexo,再commit数量还是一样。

07-19

分离仓库,hexo-blog-encrypt 页面锁,搜索仅标题

07-18

自2025-7-3以来也是多次修改,走了很多弯路,明明想着内容为导向,一看美化就忍不住去试,一路也是报错过时的太多,回退得要吐了。
不管怎样还是很满意,起码不难看,其他做不来,太麻烦。
足迹页藏宝阁什么的初看很馋,改的太多太容易报错了,也不能光美化,那些用不到。

一图流,透明背景,夜间星空,外挂标签,不同页面背景图,文章隐藏,双评论,多图床

动态标题

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// themes/butterfly/source/js/title.js

var OriginTitle = document.title; // 修正变量名拼写
var titleTime;

document.addEventListener('visibilitychange', function () {
if (document.hidden) {
document.title = '(^▽^)ノ ';
clearTimeout(titleTime);
} else {
document.title = '♪(^∇^*) 欢迎回来! ' + OriginTitle;
titleTime = setTimeout(function () {
document.title = OriginTitle;
}, 2000);
}
});

夜间星空(其实不像)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function dark() {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var n, e, i, h, t = .05,
s = document.getElementById("universe"),
o = !0,
a = "180,184,240",
r = "226,225,142",
d = "226,225,224",
c = [];

function f() {
n = window.innerWidth, e = window.innerHeight, i = .216 * n, s.setAttribute("width", n), s.setAttribute("height", e)
}

function u() {
h.clearRect(0, 0, n, e);
for (var t = c.length, i = 0; i < t; i++) {
var s = c[i];
s.move(), s.fadeIn(), s.fadeOut(), s.draw()
}
}

function y() {
this.reset = function () {
this.giant = m(3), this.comet = !this.giant && !o && m(10), this.x = l(0, n - 10), this.y = l(0, e), this.r = l(1.1, 3.0), this.dx = l(t, 6 * t) + (this.comet + 1 - 1) * t * l(50, 120) + 2 * t, this.dy = -l(t, 6 * t) - (this.comet + 1 - 1) * t * l(50, 120), this.fadingOut = null, this.fadingIn = !0, this.opacity = 0, this.opacityTresh = l(.2, 1 - .4 * (this.comet + 1 - 1)), this.do = l(5e-4, .002) + .001 * (this.comet + 1 - 1)
}, this.fadeIn = function () {
this.fadingIn && (this.fadingIn = !(this.opacity > this.opacityTresh), this.opacity += this.do)
}, this.fadeOut = function () {
this.fadingOut && (this.fadingOut = !(this.opacity < 0), this.opacity -= this.do / 2, (this.x > n || this.y < 0) && (this.fadingOut = !1, this.reset()))
}, this.draw = function () {
if (h.beginPath(), this.giant) h.fillStyle = "rgba(" + a + "," + this.opacity + ")", h.arc(this.x, this.y, 3, 0, 2 * Math.PI, !1); // 增大巨星的大小
else if (this.comet) {
h.fillStyle = "rgba(" + d + "," + this.opacity + ")", h.arc(this.x, this.y, 2, 0, 2 * Math.PI, !1); // 彗星大小稍微加大
for (var t = 0; t < 30; t++) h.fillStyle = "rgba(" + d + "," + (this.opacity - this.opacity / 20 * t) + ")", h.rect(this.x - this.dx / 4 * t, this.y - this.dy / 4 * t - 2, 2, 2), h.fill()
} else h.fillStyle = "rgba(" + r + "," + this.opacity + ")", h.rect(this.x, this.y, this.r, this.r);
h.closePath(), h.fill()
}, this.move = function () {
this.x += this.dx, this.y += this.dy, !1 === this.fadingOut && this.reset(), (this.x > n - n / 4 || this.y < 0) && (this.fadingOut = !0)
}, setTimeout(function () {
o = !1
}, 50)
}

function m(t) {
return Math.floor(1e3 * Math.random()) + 1 < 10 * t
}

function l(t, i) {
return Math.random() * (i - t) + t
}

f(), window.addEventListener("resize", f, !1),
function () {
h = s.getContext("2d");
for (var t = 0; t < i; t++) c[t] = new y, c[t].reset();
u()
}(),
function t() {
document.getElementsByTagName('html')[0].getAttribute('data-theme') == 'dark' && u(), window.requestAnimationFrame(t)
}()
};
dark()

放几个参考
魔改笔记五:从头开始,手搓一个关于页面
Hexo中Buttefly 最新教程总览
butterfly重装日记
Butterfly美化总结
hexo博客butterfly主题安装及魔改笔记
手把手教你用git上传项目到 GitHub
butterfly主题魔改02 太花了,看着难受
MyBlog 较久远的 hexo 博客搭建
butterfly官方文档 一切先跟着官方改,能减少 80%的弯路
枫叶
Ariasakaの小窝

几个风格比较喜欢的博客,不是友链
清羽飞扬
pinpe很简洁
马草原