v0.4.0
特性
- 新增鼠标特效支持 (
mouse-firework),可通过firework配置项启用,支持移动端禁用选项 - 新增侧边栏小部件支持 (
widgets),支持分类、标签、标签云、归档、最近文章等小部件 - 新增首页分类卡片支持 (
home_categories),可展示指定分类及其封面图 - 新增 ICP 备案信息支持,包括工信部备案和萌国 ICP 备案
- 新增三角徽标支持 (
triangle_badge),可在页面角落显示 GitHub 等图标 - 新增 Giscus、Utterances、Twikoo、Disqus 评论系统支持
- 新增文章过期提醒功能 (
outdate),可自定义过期天数 - 新增文章分享功能 (
share),支持微博、QQ、微信、Twitter、Facebook 等平台 - 新增赞助功能 (
sponsor),支持展示赞助二维码 - 新增版权声明国际化支持,可自定义显示内容(作者、链接、标题、日期、许可协议等)
- 新增丰富的内置 MDX 组件:
AlertBlockquote- 警告提示框(支持 info、warning、danger、tip、important 类型)Details- 可折叠详情组件TagRoulette- 标签轮盘组件Grid/GridCell- 网格布局组件Tabs/TabItem- 标签页组件Gallery- 照片墙组件Link- 内部/外部链接卡片组件HeatMapCard- 热力图卡片组件(基于访问量数据)
- 支持在 MDX 文件中展示 Mermaid 流程图,主题自动跟随网站暗色/亮色模式
- 代码块基于 Expressive Code 实现,新增以下功能:
- 支持行号显示 (via
@expressive-code/plugin-line-numbers) - 支持自动主题切换,代码高亮主题跟随网站暗色/亮色模式
- 支持行号显示 (via
- 头图随机算法改为 Fisher-Yates 洗牌算法,提高随机性和性能
- 新增自定义字体支持,使用
vite-plugin-font自动扫描和优化字体加载
重构
- 配置文件从 YAML 格式迁移到 TypeScript 格式,提供更好的类型安全和智能提示
- 图片灯箱从 baguettebox 迁移到 PhotoSwipe
- 移除 Lozad 懒加载库,改用原生
loading="lazy" - 更换默认头图
- 更换默认字体为霞鹜文楷 (LXGWWenKai SC),提升中文显示效果
Features
- Added mouse firework effects support (
mouse-firework) configurable viafireworkoption with mobile disable capability - Added sidebar widgets support (
widgets) including category, tag, tag cloud, archive, and recent posts widgets - Added home category cards support (
home_categories) to display specified categories with cover images - Added ICP filing information support including MIIT filing and Moe ICP filing
- Added triangle badge support (
triangle_badge) to display GitHub or other icons in page corners - Added support for Giscus, Utterances, Twikoo, and Disqus comment systems
- Added post outdated warning feature (
outdate) with customizable expiration days - Added post sharing feature (
share) supporting Weibo, QQ, WeChat, Twitter, Facebook, and more platforms - Added sponsorship feature (
sponsor) with QR code display support - Added internationalized copyright notice with customizable content (author, link, title, date, license, etc.)
- Added rich built-in MDX components:
AlertBlockquote- Alert boxes (supports info, warning, danger, tip, important types)Details- Collapsible details componentTagRoulette- Tag roulette componentGrid/GridCell- Grid layout componentsTabs/TabItem- Tab componentsGallery- Photo gallery componentLink- Internal/external link card componentHeatMapCard- Heatmap card component (based on visit data)FriendCard- Friend link card component
- Added support for Mermaid diagrams in MDX files with automatic theme switching for dark/light mode
- Reimplemented code blocks with Expressive Code featuring:
- Line numbers display (via
@expressive-code/plugin-line-numbers) - Automatic theme switching with syntax highlighting following site dark/light mode
- Line numbers display (via
- Improved banner randomization using Fisher-Yates shuffle algorithm for better randomness and performance
- Added custom font support using
vite-plugin-fontfor automatic font scanning and optimization
Refactor
- Migrated configuration files from YAML to TypeScript for better type safety and IntelliSense
- Migrated image lightbox from baguettebox to PhotoSwipe
- Removed Lozad lazy loading library in favor of native
loading="lazy" - Updated default banner image
- Changed default font to LXGWWenKai SC for improved Chinese text rendering
Full Changelog: v0.3.0...v0.4.0