Choose Theme

Shortcuts: ⌘ ⇧ P
↑↓ Navigate • Enter Confirm • Esc Close
🖥️ System
🌻 Latte
🦭 Nord
🐻‍❄️ Nord Night
🌺 Macchiato
🌿 Mocha
🏙 Tokyo Night

Use Shiki StyleToClass Transformer

Shiki 作为比较流行的代码高亮工具,提供比 highlight.js更准确的代码高亮效果;以 console.log("hello")为例,Shiki 高亮器按照代码语义将其拆分为 6 部分;其被 <span>标签包裹,标签的内联样式中可能有 color,font-style等属性以及一些 CSS 变量[1],用于实现颜色[2]以及字体[3]多主题适配

JS
const code = await codeToHtml('console.log("hello")', {  lang: "javascript",  themes: { light: "min-light", dark: "nord" },});

上面的示例输出中,HTML 体积尚可接受,一是代码量很小,此外是仅应用了 min-lightnord 两种主题,且这两个主题仅在实例代码中嵌入了 color 属性以及 --shiki-dark 变量;

当这些条件不满足时,输出的 HTML 体积会大幅增加。例如个人博客中包含一些长代码片段,同时应用了 catppuccin-latte, catppuccin-mocha, tokyo-night, nord, tokyo-night 5 种主题,输出的 HTML 就略显臃肿;下文将记录如何使用 styleToClass Transformer 来优化 Shiki 高亮器的输出。

网站Dark Mode&多配色主题开发lqip

Blog页内跳转体验优化

最近写markdown比较爱用footnote[1],点击后可在网页中使用跳转。

MD
Here's a simple footnote,[^1] and here's a longer one.[^bignote][^1]: This is the first footnote.[^bignote]: Here's one with multiple paragraphs and code.    Indent paragraphs to include them in the footnote.    `{ my code }`    Add as many paragraphs as you like.

但默认行为并不友好。跳转后内容经常被博客顶部的固定导航栏遮挡住,无法看到跳转后的内容。本文记录优化方案

Hexo 网站性能优化记录lqip

Hexo 网站性能优化记录

去年九月在博客性能优化文中,记录优化Hexo Blog性能措施。最近针对当时未解决的部分性能问题,又进行了一系列的优化,记录下来作为前文的补充「2024.9-2025.10」
VSCode Status Bar Ricinglqip
Hexo Shiki Highlighter Live Demolqip
Spotify Ricing(Spicetify)lqip

Spotify Ricing(Spicetify)

🤖 Transform your Spotify client with custom themes and extensions using Spicetify. This guide walks you through installing Spicetify CLI and Marketplace on Windows, Linux, and MacOS, helping you personalize your music streaming experience with beautiful themes and powerful add-ons. Elevate your desktop aesthetics with minimal effort!
VSCode Ricinglqip

VSCode Ricing

VSCode可以在settings.json进行高度自定义,社区也提供很多主题相关的扩展。但官方提供的接口有限,进一步自定义就需要借助插件来实现。本文主要记录对VSCode的个性化定制。

Markdown Test

Test various Markdown features including color schemes, math, task lists, callouts, and code blocks.