关于本站如何实现

博客源代码在github开源,github - kenshin2438.top

由于代码来自各处,又经过多次修改。事实上本人已经疲于维护,准备择日拿TailWind重写(学习前端ing~~)。

Hello World

无法忍受hexo的速度,故换到hugo,使用主题为PaperMod

各种参考源

感谢互联网,让本前端菜鸡也能尽可能找到自己想要的实现方式。

TODO

  • failed 尝试用pandoc渲染(不行就算了,等会了再来)
  • 筛选旧博客,剔除/修改部分低创内容,与主题相适应。
  • failed 更换字体,并解决Mathjax字体大小同全局字体的冲突
  • permalinks修改,正在考虑换域名一事
  • failed 内容加密,类似hexo-blog-encrypt的实现方式
  • deleted img lazyload(暂时用不到)
  • deleted bilibili视频引入。(受到b站api限制,画面质量太低,准备清除)
  • 寻找更好的侧边toc实现方式。
  • 使用 <!-- more --> 自动摘要
  • 解决移动端Mathjax公式过长带来的问题
  • 修复cases大括号断裂 (已替换为svg格式显示)
  • 解决code块出现黑色背景色的问题,恢复圆角显示
  • deleted 停用hugo官方提供的chroma,使用highlight.js高亮代码
  • twikoo 评论邮箱自动通知部署
  • 更换适合国内网络环境的cdn,或者放在本地(次之)。包含twikoo, mathjax

测试

Math

When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

测试较长公式的处理

  • 行内公式(使用$...$

$A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B$

  • 行间公式(使用$$...$$

$$ A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B=A=B $$

Admonition

node
Something
abstract
Something
info
Something
tip
Something
success
Something
question
Something
warning
Something
failure
Something
danger
Something
bug
Something
example
Something
quote
Something

Highlight

1
2
3
4
5
6
#include <iostream>

int main() {
	std::cout << "Hello World!" << std::endl;
	return 0;
}