Margrop
Articles241
Tags633
Categories6

Categories

1password 24GB VRAM 2K 3.6 Flash 30B dense 4-bit 量化 6-DoF SLAM AC ACP AI Agent AI Coding Assistant AI Tech AI tutor AI 安全 AI 应用 AI 日记 AI编程助手 ALTK-Evolve AMIE AP API API 定价 API 降价 ARC-AGI-3 ASR ATEM chat 模板 Agent Agent Harness Agent Memory Agent 入侵 Agent 工程 Agent 架构 Agent 检索 Agent 沙箱 Agent 系统 Agent 路由 Agentic AI Agentic tools Ai2 Alertmanager AllenAI Android 17 Antigravity AppDaemon AppWorld Aqara Astra Attention Baseten Benchmark CC-Switch CI/CD CLI Tools CLI工具 CPU 推理 Cache Hit Rate Caddy ChatGPT Claude Code Claude Sonnet ClawLoader Code Interpreter Codex ComfyUI Computer Use Cookie 认证 Cosmos-H-Dreams Cost Optimization Cron DFIR DSpark Date DeepSeek DeepSeek V4 Flash Diagrams.net Diary Diffusers Diffusion Docker Efficiency Tools Embedding English FSDP2 Fable 5 Fireworks AI FlashAttention FlashDreams GGUF GLM 5.2 GLM-5.2 GPT-4.1 GPT-5.6 GPT-Live GPT-Red GPU 加速 GPU 性能分析 Gateway Gemini Gemini 3.5 Flash Gemini API Gemini CLI Gemini Omni Flash Gemma 4 12B Gemma Translator Gemma4 GitHub Actions Google Google AI Google Research Google Sheets Grabette Gripette HA HADashboard HF Security Incident Hailuo Hermes Hexo HomeAssistant Hugging Face IBM Research Inference Providers Isaac Lab Java KV cache Kimi K3 Kubernetes LFM2.5 LFM2.5-VL LLM Router LVM‑Thin Late Interaction LeRobot Linux Liquid AI LiquidAI Live Translate LoRA Luna MCP MTP MacOS Magpie TTS Managed Agents Meta Microsoft 365 Copilot MiniMax Mistral Shieldstral Model Routing MuJoCo Warp Multi-Agent Multi-Vector Muse Glimmer MySQL NAS NIM NVIDIA NeMo Automodel Nemotron 3 Embed Newton Nginx Node.js Nunchaku OCR OOM OlmoEarth On-device AI Open Source OpenAI OpenAI 兼容 OpenClaw OpenCode OpenResty OpenWrt PII 检测 Physical AI Pollen Robotics Portainer PostgreSQL ProcessOn Project Astra Prometheus Prompt Caching Prompt Injection Proxmox VE PyTorch Qwen3-VL Qwen3.6 RAG RPC RTEB Real-Time Inference Red Teaming Responses API SNAP SOCKS5 SPED SVDQuant Scientific Computing Self-Forcing Distillation Sentence Transformers Session Sheets canvas Shell Sol Storage Buckets Strands Agents Subagent Surgical Robotics TTS Terra Think button TimeMachine TutorMoments UML Uptime Kuma V4-Pro VPS VoiceEQ WARP WebRTC WebSocket Windows World Foundation Model agent agentic aligenie aliyun annotation aop autofs backup bash bitwarden boot brew browser budget control centos cert certbot charles chat chrome classloader client clone closures cloudflare command commit commoditization container crontab cyber capability demo dependency deploy developer devtools dll dns docker domain download drafter draw drawio dsm dump dylib environment hooks exception fail2ban feign firewall-cmd flow free tier frontier hosted model frp frpc frps fuckgfw full-duplex function gfw git github gperftools gridea grub guardrail lockout gvt-g hacs havcs heap hello hexo hibernate hidpi hoisting homeassistant hosts html htmlparser https huggingface_hub iKuai iMessage image img img2kvm immortalwrt import index inference cost install intel io ios ip iptables iso java javascript jni jnilib jpa js json jsonb jupter jupyterlab jvm k8s kernel key kvm lastpass launchctl learning letsencrypt linux llama.cpp low-code lvm mac mariadb markdown maven md5 microcode mirror modules monitor mount mstsc multimodal mysql n5105 network nfs node node-red nodejs nohup notepad++ npm nssm ntp oop open weights openfeign openssl os ovz packet capture pdf pem perf pip plugin png powerbutton print pro productive struggle pve pvekclean python qcow2 qemu qemu-guest-agent rar reasoning control reasoning slider reboot reflog remote remote desktop renew repo resize retina router runtime safari sata scaffolding scheduled triggers scipy-notebook scoping scp self-play server serverless inference silent test simulated student so speculative decoding spk spring springboot springfox ssh ssl stash string support svg svn swagger sync synology systemctl systemd template terminal txt ubuntu ui undertow unlocker upgrade vLLM vhd vim vm vmdk web windows with worker xml yum zai-org/GLM-5.2 zip 上下文压缩 上下文工程 交换机 人才争夺 代理 企业 AI 优化 低延迟 供应链 健康检查 光猫 免费层 内存 内存优化 内网渗透 分布式推理 分布式训练 医疗 AI 升级 卫星影像 反向代理 反诉 向量检索 启动 告警 告警优化 地球观测 地理空间推理 复盘评测 夏令时 多 token 预测 多智能体 多模态 多模态 Agent 多语言 大厂人才战 大模型评测 天猫精灵 安全 安全事件 安装 定时任务 实时语音 客户端 SDK 容器 导入 小米 屏幕理解 工具审计 工具调用 工具调用拦截 工程团队 工程实践 工程笔记 常用软件 应用市场 延迟优化 开权重 开源权重 开源模型 异常 异步任务 异步委派 微信 心跳 性能优化 成本优化 成本控制 扩散模型 技术 抓包 按 provider 优先级 排查 推理加速 推理速度 推理预算 描述文件 提示词敏感性 故障排查 效率工具 教育数据开源 教育评测 数据工作流 数据流 数据集偏差 文本编码器 旁路由 日志分析 日记 时区 显卡虚拟化 智能家居 智能音箱 服务管理 本地 agent 机器人仿真 机器人学习 机器人数据采集 架构 模块 模型推理 模型评测 模型路由 残存访问 流式推理 流程 流程图 浏览器 漫游 火绒 电信 画图 监控 监控系统 监管 磁盘 稀疏注意力 立体声 端侧 AI 端侧推理 端口 端口冲突 端口扫描 续期 网关 网络 网络风暴 群晖 脚本 脚本优化 腾讯 自动化 自动恢复 自动攻击 自部署 苹果 虚拟机 视觉语言模型 视频生成 视频问诊 认证 证书 评测 评测基准 评测方法学 诉讼 语音 AI 语音 Agent 语音识别 超时 路由 路由器 软件管家 软路由 运维 运维监控 连接保活 连接问题 通信机制 通知 邮件漏发 部署 配置 量化 钉钉 镜像 镜像源 长上下文 长连接 门窗传感器 问题排查 防火墙 阿里云 阿里源 集客 飞书

Hitokoto

Archive

从Gridea迁移到Hexo,过程及注意事项

从Gridea迁移到Hexo,过程及注意事项

参考文章

https://blog.dctewi.com/2024/01/summary-hexo-migration

安装 Hexo

安装Hexo其实挺傻瓜式的,基本按着官方教程走下来就ok了。
注:需要先准备 nodejsnpm ,由于各个系统安装步骤并不一致,建议使用 ubuntu,一键搞定安装。

1
2
3
npm install -g hexo-cli
hexo init
npm install

就万事大吉了,就非常的傻瓜式。

配置 _config.yml

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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# 博客基础配置
title: 魔都水滴
subtitle: ''
description: ''
keywords: null
author: Margrop
language: cn
timezone: Asia/Shanghai
url: http://blog.margrop.com
permalink: '/post/:name/' # 为完全兼容 Gridea 路径,换成了/post/:name/
permalink_defaults: null
pretty_urls:
trailing_index: true
trailing_html: true
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: ':lang'
skip_render: null
new_post_name: ':title.md'
default_layout: post
titlecase: false
external_link:
enable: true
field: site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false

# 想了下, Github Page在国内某些运营商网络下可能比较慢, 所以镜像了Gitee Page
# 这就需要生成相对路径而不是绝对路径
relative_link: true
future: true

# 和主题配合设置代码高亮
syntax_highlighter: highlight.js
highlight:
line_number: true
auto_detect: true
tab_replace: ''
wrap: true
hljs: true
prismjs:
preprocess: true
line_number: true
tab_replace: ''

# 分页相关配置
index_generator:
path: ''
per_page: 10
order_by: '-date'
default_category: uncategorized
category_map: null
tag_map: null
meta_generator: true
date_format: YYYY-MM-DD
time_format: HH:mm:ss
updated_option: mtime
per_page: 10
pagination_dir: page
include: null
exclude: null
ignore: null

# 主题配置
theme: nexmoe

# 部署相关配置
deploy:
- type: git
repo: [email protected]:margrop/margrop2.github.io.git
branch: hexo
message: '[update] hexo updated at {{ now(''yyyy-MM-dd HH:mm:ss'') }}'

更换主题和安装插件

原版主题有种2016年Wordpress默认主题的味道,在主题商店翻了半天,找到了这个叫做NexMoe的主题,感觉还不错。

依旧是傻瓜式安装:

1
2
3
npm install hexo-theme-nexmoe hexo-renderer-inferno
hexo config theme nexmoe
hexo g && hexo s

进行一次hexo gen之后,会在根目录生成一个_config.nexmoe.yml,这就是主题的配置文件了。这个主题的配置还挺多的,配置了半天。

  • 注:这里改用了与 Gridea 一致的 Gitalk 插件,请根据自己的需要自行调整
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
avatar: /images/avatar.webp # 网站 Logo
background: # 既是博客的背景,又是文章默认头图
path: /images/background.webp
width: 1280
height: 720
favicon:
href: /favicon.ico # 网站图标
type: image/x-icon # 图标类型,可能的值有(image/png, image/vnd.microsoft.icon, image/x-icon, image/gif)

function: # 功能开关,可选值(true,false)
globalToc: true # 开启该功能会自动开启文章 TOC(文章目录) 功能
wordCount: true # 是否开启文章字数统计 (true, false)
copyCode: true # 是否允许复制代码块

imageCDN: # 图片 CDN 功能
enable: false # 开启该功能
origin: /../../images/ # 图片原始目录
to: https://cdn.jsdelivr.net/gh/nexmoe/nexmoe.github.io@latest/images/ # 图片 CDN 域名

# 自定义样式,启用后可在站点的source文件夹下新建custom.css自定义站点样式
customStyles:
- custom.css

# 附加图标库 使用说明:https://docs.nexmoe.com/config/icon
iconlib: # //at.alicdn.com/t/font_1038733_0xvrvpg9c0r.css

menu:
回到首页:
- /
- icon-home
文章归档:
- /post/archives/
- icon-container
下载:
- https://download.margrop.net/
- icon-container
常用链接:
- /post/favorites/
- icon-unorderedlist
GithubStars:
- /post/github-project-stars/
- icon-github
给我赞助:
- /post/donate/
- icon-coffee
关于博主:
- /post/about/
- icon-info-circle

widgets:
- name: search
enable: true
options:
search:
type: engine # 可选engine(用搜索引擎搜索)、swiftype、或local(本地搜索)
url: https://cn.bing.com/search?q=site:margrop.com # 搜索引擎地址,在type为swiftype时无效 e.g:https://www.google.com/search?q={你的博客链接}
id: <swiftype-id> # swiftype的id,见启用教程。在type为engine时无效
- name: social
enable: true
options:
social:
QQ群:
- http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=weD8TANNWdCOveAMcdmoAxOKt5owKkDS
- icon-QQ
- rgb(249, 174, 8)
- rgba(249, 174, 8, .1)
#哔哩哔哩:
# - https://space.bilibili.com/20238211
# - icon-bilibili
# - rgb(231, 106, 141)
# - rgba(231, 106, 141, .1)
GitHub:
- https://github.com/margrop/
- icon-github
- rgb(25, 23, 23)
- rgba(25, 23, 23, .1)
#知乎:
# - https://www.zhihu.com/people/nexmoe
# - icon-zhihu
# - rgb(30, 136, 229)
# - rgba(30, 136, 229, .1)
#Twitter:
# - https://twitter.com/dennis_1125
# - icon-twitter
# - rgb(59, 151, 239)
# - rgba(59, 151, 239, .1)
RSS:
- /atom.xml
- icon-rss
- rgb(247, 132, 34)
- rgba(247, 132, 34, .1)
- name: category
enable: true
- name: tagcloud
enable: true
options:
maxTagcloud: 17 # 标签云组件显示的标签数量,0 表示不限制
- name: hitokoto # 一言 widget
enable: true
options:
widgetHitokoto: # 一言组件
loading_placeholder: '🚀 获取中...' # 正在一言时的占位符
loading_error_placeholder: '🐞 获取失败...' # 加载一言失败时的占位符
category: # 一言句子类型(可选),不配置的话随机获取,详见 https://developer.hitokoto.cn/sentence/#%E5%8F%A5%E5%AD%90%E7%B1%BB%E5%9E%8B-%E5%8F%82%E6%95%B0
- name: archive #settings: widgetAchive
enable: true
options:
widgetAchive: #文章归档组件
archive_type: 'year' #按月展示还是按年展示
show_count: true #是否展示数量
- name: recent_posts
enable: true
- name: link #settings: widgetLink
enable: true
options:
widgetLink: #链接组件
- title: 魔都水滴Blog
img: /images/avatar.webp
link : https://blog.margrop.net/

copyTip: "著作权归作者所有。\n商业转载请联系作者获得授权,非商业转载请注明出处。\n来源:%url" # 自定义复制版权文案,使用 %url 代替当前页面URL, 修改为false禁用

slotHead: |
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id:"23bDEwNOu1L8NhV1",ck:"23bDEwNOu1L8NhV1"})</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4NGHEP8LEV"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-4NGHEP8LEV');
</script>

slotFooter: |
<script src="https://cdn.jsdelivr.net/npm/mathjax@latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});</script>

# 自定义侧边栏尾部内容
slotSidebar: |

# 评论框插槽
slotComment: |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
const gitalk = new Gitalk({
clientID: 'Ov23lib2oiNKjG5B7I1N',
clientSecret: '0a94653f17a7b9630d85b275008da4b38e0259dd',
repo: 'margropcomment.margrop.io', // The repository of store comments,
owner: 'margrop',
admin: ['margrop'],
pagerDirection: 'last',
id: window.location.pathname.substring(0, 49), // 使用 pathname 的前49个字符作为 id
title: document.title,
language: 'zh-CN', // 根据需要设置语言
distractionFreeMode: false
})
gitalk.render('gitalk-container')
</script>

slotCopyright: |
<strong>版权声明:</strong>本文采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/cn/deed.zh" target="_blank">CC BY-NC-SA 3.0 CN</a> 协议进行许可

slotArticleEnd: |

之后把所需要的几个插件安装一下:

1
2
3
4
npm install hexo-generator-feed
npm install hexo-generator-json-content
npm install hexo-generator-sitemap
npm install hexo-word-counter

并且在_config.yml中进行配置:

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
# hexo-generator-feed
feed:
enable: true
type: atom
path: atom.xml
limit: 20
hub: null
content: null
content_limit: 140
content_limit_delim: ' '
order_by: '-date'
icon: icon.png
autodiscovery: true
template: null

# hexo-generator-json-content
jsonContent:
meta: false
pages: false
posts:
title: true
date: false
path: true
text: true
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: false

# hexo-word-counter
symbols_count_time:
symbols: true
time: true
total_symbols: false
total_time: false
exclude_codeblock: true
awl: 4
wpm: 700
suffix: ''

# hexo-generator-sitemap
sitemap:
path: sitemap.xml
# template: ./sitemap_template.xml
rel: true
tags: false
categories: false

到这里就大功告成了,剩下的就是迁移内容。

迁移Markdown

原 Gridea 目录:./post/ -> 新 Hexo 目录 ./source/_posts/

迁移图片资源

原 Gridea 目录:./post-images/ -> 新 Hexo 目录 ./source/_posts/
原 Gridea 文件:./favicon.ico -> 新 Hexo 文件 ./source/favicon.ico

绝对路径改为相对路径

原 Gridea 的 markdown 文件中,图片引用的是绝对路径。
需要使用任意批量文件替换工具,将其替换为相对路径。

其他的一些配置

NexMoe主题配置

NexMoe主题支持给文章配图,格式如下

1
2
3
cover: /images/banner/1015_20240930_111405.webp
coverWidth: 1280
coverHeight: 720

配置 Gitalk

  • 按照官网配下来就可以,本地配置在上方有写。
  • 注:Github 对唯一 tag 的长度有限制,Gridea 使用的是 pathname 作为评论唯一 tag
  • 上面的配置中,当 pathname 超过49字节时,Gitalk 使用前49个字节作为评论唯一 tag

其他Hexo以及NexMoe的玩法,待后续更新

本文阅读量 --
Author:Margrop
Link:https://blog.margrop.com/post/transfer-from-gridea-to-hexo/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可