很荣幸你能看上我的拙作啦:),下面是本主题的使用手册

快速开始

安装

Hexo博客根目录下,执行:

1
git clone https://github.com/forever218/hexo-theme-magzine.git themes/magzine

如果在连接github时遇到困难,可以选择使用gitee源:

1
git clone https://gitee.com/ran_brother/hexo-theme-magzine.git themes/magzine

请注意,gitee的版本可能会稍微滞后于github

升级

主题目录下:

1
git pull

请妥善保管好主题config文件,建议升级前复制一份保存

评论

在主题配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
# Comments (optional)
comments:
enable: true
type: twikoo # disqus, gitalk, valine, twikoo
shortname:
# Twikoo configuration
twikoo:
envId: # Your environment ID
region: # Your service region, e.g. ap-guangzhou
path: window.location.pathname # Default is window.location.pathname
visitor: true # Enable visitor count
option: # Additional options

填写twikoo的环境ID,部署方法参见twikoo文档

AI摘要

在主题配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# AI摘要配置
ai_summary:
enable: true # 是否启用AI摘要功能,默认关闭
api_key: "" # DeepSeek API密钥
summary_directly: false # 是否直接生成摘要,默认为false(需要点击按钮生成)
# 其他可选配置
ai_name: "然-AI" # AI名称
ai_introduce: "我是文章辅助AI: 然-AI,一个基于deepseek的强大语言模型,有什么可以帮到您?😊" # AI介绍语
ai_version: "deepseekv3" # AI版本显示
# 按钮文本
buttons:
- "介绍自己"
- "来点灵感"
- "生成AI简介"

对于该功能,只需将enable改为true,不需要填入apikey
因为原来的方案已被证实不安全,新版方案参见Workers实现Api白名单

页面

标签页

Hexo博客根目录下,执行:

1
hexo new page tags

随后修改根目录\source\tags下的index.md文件:

1
2
3
4
5
---
title: tags
date: 2025-08-30 17:25:52
layout: tag
---

分类页

Hexo博客根目录下,执行:

1
hexo new page categories

随后修改根目录\source\categories下的index.md文件:

1
2
3
4
5
---
title: categories
date: 2025-09-05 13:55:34
layout: categories
---

友链页

Hexo博客根目录下,执行:

1
hexo new page link

随后修改根目录\source\link下的index.md文件:

1
2
3
4
5
---
title: link
date: 2025-09-05 13:55:34
layout: link
---

创建根目录\source_data\link.yml文件:

1
2
3
4
5
6
7
8
9
10

- name: 未来的回忆
link: https://2am.top
avatar: https://2am.top/images/0.gif
description: 人生而自由,却无往不在枷锁之中

- name:
link:
avatar:
description:

关于页

Hexo博客根目录下,执行:

1
hexo new page about

随后到\themes\magzine\layout\about.pug文件修改自己喜欢的样式

标签外挂

note

写法:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% note default modern %}
default提示块标签
{% endnote %}
{% note info modern %}
info提示块标签
{% endnote %}
{% note success modern %}
sucess提示块标签
{% endnote %}
{% note warning modern %}
warning提示块标签
{% endnote %}
{% note danger modern %}
danger提示块标签
{% endnote %}

效果:

default提示块标签

info提示块标签

sucess提示块标签

warning提示块标签

danger 提示块标签

写法:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% note default simple %}
default提示块标签
{% endnote %}
{% note info simple %}
info提示块标签
{% endnote %}
{% note success simple %}
sucess提示块标签
{% endnote %}
{% note warning simple %}
warning提示块标签
{% endnote %}
{% note danger simple %}
danger提示块标签
{% endnote %}

效果:

default提示块标签

info提示块标签

sucess提示块标签

warning提示块标签

danger 提示块标签

button

基本格式:

1
{% btn [url] [text] [icon] [option] %}
参数 释义
[url] 目标地址
[text] 按钮文本
[icon] 图标
[option] 可选:color outline center block larger
[color] 为上述option的子项,可选:default blue pink red purple orange green

写法:

1
2
3
4
5
6
{% btn 'https://2am.top',我的博客,far fa-hand-point-right,blue larger %}
{% btn 'https://2am.top',我的博客,far fa-hand-point-right,purple outline %}
{% btn 'https://2am.top',我的博客,far fa-hand-point-right,pink block %}
{% btn 'https://apps.microsoft.com',微软,far fab fa-windows,green larger %}
{% btn 'https://github.com',Github,far fab fa-github,red larger %}
{% btn 'https://github.com',Github,far fab fa-github,red center %}

效果:

我的博客 我的博客 我的博客 微软 Github Github

tabs

写法:

1
2
3
4
5
6
7
8
{% tabs 标签id %}
<!-- tab 标签1 -->
内容1
<!-- endtab -->
<!-- tab 标签2 -->
内容2
<!-- endtab -->
{% endtabs %}

效果:

内容1

内容2

folding

写法:

1
2
3
4
5
6
7
{% hideToggle 文字内容 %}
这里是测试样例
这里是测试样例
这里是测试样例
这里是测试样例
这里是测试样例
{% endhideToggle %}

效果:

文字内容

这里是测试样例
这里是测试样例
这里是测试样例
这里是测试样例
这里是测试样例

折叠标签里可以嵌套图片等其他标签哦

video

基本格式:

1
{% video VIDEO_URL %}

写法:

1
{% video https://www.bilibili.com/video/BV1jzYXzVECb %}

效果:

支持平台:Bilibili,AcFun,西瓜视频,虎牙直播,YouTube,Twitter/X,Instagram,Twitch

timeline

基本格式:

1
2
3
4
5
6
7
8
{% timeline 标题%}
<!-- timeline 时间 -->
内容
<!-- endtimeline -->
<!-- timeline 时间 -->
内容
<!-- endtimeline -->
{% endtimeline %}

写法:

1
2
3
4
5
6
7
8
9
10
11
{% timeline 2026年%}
<!-- timeline 1-20 -->
准备起飞
<!-- endtimeline -->
<!-- timeline 1-21 -->
正在起飞
<!-- endtimeline -->
<!-- timeline 1-22 -->
允许降落
<!-- endtimeline -->
{% endtimeline %}

效果:

2026年
1-20

准备起飞

1-21

正在起飞

1-22

允许降落

hideinline

基本格式:

1
{% hideInline [隐藏文字],[显示文字],[背景色],[字体色] %}

写法:

1
这里是测试字段{% hideInline 不嘻嘻😠,嘻嘻🤭,#FF7242,#fff %}这里是测试字段{% hideInline 隐藏文字,显示文字,#87CEEB,#fff %}这里是测试字段

效果:
这里是测试字段嘻嘻🤭这里是测试字段显示文字这里是测试字段

label

基本格式:

1
{% label [text] [color] %}
参数 释义
[text] 文本
[color] 颜色,可选:default primary success info warning danger important或者是自定义16进制颜色代码
写法:
1
{% label 测试样例 red %}{% label 测试样例 info %}

效果:

测试样例测试样例

后记

我本着对极简的追求设计了这个主题一些碎碎念,我希望浏览博客能像翻杂志一样。某些方面来说,这是一个半成品,或者说概念版,仔细观察就能发现很多小瑕疵。希望以后自己有时间能完善这个作品,也感谢所有使用这个主题、为这个主题提出建议、PR的人,你们的加入让这个项目变得更好。