惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
D
Docker
S
SegmentFault 最新的问题
博客园 - 聂微东
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
L
LangChain Blog
Vercel News
Vercel News
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
T
Threatpost
Scott Helme
Scott Helme
T
Tailwind CSS Blog
Latest news
Latest news
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
The Register - Security
The Register - Security
罗磊的独立博客
P
Proofpoint News Feed
腾讯CDC
S
Schneier on Security
雷峰网
雷峰网
A
About on SuperTechFans
T
Tenable Blog
F
Full Disclosure
Cyberwarzone
Cyberwarzone
博客园_首页
有赞技术团队
有赞技术团队
K
Kaspersky official blog

文章列表

安知鱼主题美化及实用教程库 给群晖套件版Emby添加网络代理 保姆式Hexo博客搭建教程 类原生安卓网络和时间修复 解决网站 URL 加个 index.html 后 Twikoo 评论显示问题 Front-matter 的基本认识 使用fastgithub解决GitHub无法访问 主题标签 Tag Plugins 雨世界地图(简体中文) abbrlink插件生成永久固定链接 终于把hexo博客整好啦~
Twikoo 添加自定义表情包
MortalCat · 2023-07-31 · via

最近刚把博客搭好,看别人的 Twikoo 都自定义表情包,于是我也研究了一下

可能用到的

大佬整理的表情包:

修改

Twikoo 的表情使用的是 OwO ,所以表情配置为一个 json 文件

json 文件对格式要求严格,例如键与值都需要使用双引号进行包裹,如果是最后一项那么结尾不能包含逗号,可见 菜鸟教程

不过我们目前不需要了解那么深入

在表情速查里复制Twikoo适配的 json 代码,以 阿鲁 为例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"aru": {
"type": "image",
"container": [
{
"text": "aru-1",
"icon": "<img src='https://7.dusays.com/2021/01/15/3c76dffbc08a5.png'>"
},
..........
{
"text": "aru-99",
"icon": "<img src='https://7.dusays.com/2021/01/15/a5cf180e2f22a.png'>"
}
]
}
}

复制多个记得做修改,删除上一个表情末尾的一个} 然后添加 , 再把第二个开头的 { 删除 ,以 阿鲁blob 为例:

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
{
"aru": {
"type": "image",
"container": [
{
"text": "aru-1",
"icon": "<img src='https://7.dusays.com/2021/01/15/3c76dffbc08a5.png'>"
},
{
"text": "aru-99",
"icon": "<img src='https://7.dusays.com/2021/01/15/a5cf180e2f22a.png'>"
}
]
},
"blob": {
"type": "image",
"container": [
{
"text": "blob-RedTick",
"icon": "<img src='https://7.dusays.com/2021/01/15/c8407d638ca85.png'>"
},
{
"text": "blob-wumpusblob",
"icon": "<img src='https://7.dusays.com/2021/01/15/309dc42e77869.png'>"
}
]
}
}

可以前往 在线JSON格式化验证工具 检查是否有误

额外

如果你想选择表情包显示图标而不是文字,你可以修改开头部分

图片

文字版:

1
2
3
"Sticker": {
"type": "image",
"container": [

图片版:

1
2
3
"<img src=\"https://blog.xiowo.net/img/starclaw.png\" style=\"width: 30px;top: 4px;position: relative;\" title=\"MortalCat\">": {
"type": "image",
"container": [

最后将修改好的 json 文件 上传服务器即可

注意:如需本地存放在hexo,可在你的博客目录 /source 目录下新建个名为 js 或其他名字的文件夹把制作好的 json 放进去,这个填 博客域名 /js (文件夹名字)/ 名字.json,其实就是 json 的链接地址,source 目录里的东西在生成的时候会生成到博客根目录

Twikoo 配置

进入你的 Twikoo 控制台
找到 插件 > EMOTION_CDN 填入 你的Json链接

Twikoo 配置

上面那个 SHOW_EMOTION 可以不用设置因为它默认就是 true

头像头像

MortalCat

MortalCat's blog

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Mo的记事簿