banner
云母屏风烛影深,长河渐落晓星沉。

博客搭建日记

Scroll down

追番工具

安装

1
$ npm install hexo-bangumis --save

配置

将下面的配置写入 站点 的配置文件_config.yml中:

1
2
3
4
5
6
7
8
9
10
11
12
13
bangumis:
enable: true # 是否启用
path: bangumis/index.html # 生成追番页面的路径
show: 1 # 想看,在看,看完
title: '追番列表' # 标题
quote: '生命不息,追番不止' # 格言
color_meta: "#555" # 追番项元数据的颜色
color_summary: "#555" # 追番项简介的颜色
bgmtv_uid: mmdjiji # bgm.tv的uid
download_image: true # 下载图片并使用本地图片,否则使用bgm.tv提供的网络图源
image_level: c # 图片高清等级 (l, c, m, s, g)
lazyload: true # 是否开启懒加载
margin: 20px # 封面图的偏移量微调

使用

更新追番数据:

1
$ hexo bangumis -u

删除追番数据:

1
$ hexo bangumis -d

获取 bgm.tv 的 uid

登录 bgm.tv 后打开控制台(快捷键 Ctrl + Shift + J),输入 CHOBITS_UID 后按回车,得到的数字就是 uid 啦~

项目地址:https://github.com/mmdjiji/hexo-bangumis

随机生成页面(hexo-generator-random)

安装

依赖

本插件用到的依赖如下:
1.minimatch 2.path 3.fs 4.object-assign
上面四个依赖,前三个一般hexo init之后都会有,但是第四个一般都没有(我自己测试的时候是没有的。 所以你需要先安装一下object-assign

1
npm install object-assign

本地安装

把本仓库的内容git clonedownload到本地,然后把保存到本地的文件夹放在../blog/node_modules文件夹中。然后,在博客根目录下的package.json里面的dependencies中加入这一行

1
"hexo-generator-random": "^1.0.0"

注意:如果你是加到最后一行的,在这个上面的一行要加上逗号,这是完成后的效果。

1
2
3
4
5
6
7
8
9
10
11
12
13
"dependencies": {
"hexo": "^4.0.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-index": "^1.0.0",
"hexo-generator-tag": "^1.0.0",
"hexo-generator-random": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-marked": "^2.0.0",
"hexo-renderer-stylus": "^1.1.0",
"hexo-server": "^1.0.0",
"object-assign": "^4.1.1"
}

npm安装

1
npm install hexo-generator-random --save

注意

在博客根目录下的_config.yml里面的url需要改成/或者你的域名

已知Bug

不同的主题可能会有其他页面混进随机文章

使用

上面的配置如果都是正确的话,当你hexo g之后,在public文件夹下会生成一个random.html。 直接访问yoursite/random.html就可以感受这个随机文章了。 你甚至可以直接在菜单栏里面加上一个菜单,path写上/random.html/即可。

项目地址:https://github.com/Drew233/hexo-generator-random

哔哩哔哩链接卡片(hexo-bilibili-card)

A hexo plugin insert a bilibili card into your page or article, some of css code is copy from bilibili.
一个Hexo插件,在你的文章中插入b站的视频卡片,样式模仿和借鉴自b站。

Install 安装

1
npm i hexo-bilibili-card

Preview 预览

You can click hereto see the preview website. 点击这里看预览哦~

Usage 使用

In your markdown file: 在你的markdown文件中插入以下片段

1
{% bilicard your_video_id %}

your_video_id:is the avid or bvid in Bilibili.
your_video_id:是b站的bv号或av号。
then you will get the card in your page.
然后你就可以看见文章中的卡片了。

项目地址:https://github.com/MaxChang3/hexo-bilibili-card

font 6 图标引入

在主题配置文件_config.async.yml中的assetsiconsjs内加入

1
https://kit.fontawesome.com/yourkeys.js

如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
assets:
# 主題內部 js 的 cdn 配置
internal_provider: local
# 第三方 js 的 cdn 配置
third_party_provider: unpkg
# 主题使用到的插件
plugin:
hexo_theme_async:
rowcss:
typing:
search:
main:
# 图标配置
icons:
type:
css: css/plugins/font-awesome.min.css
js: https://kit.fontawesome.com/yourkeys.js
Other Articles
Please enter keywords to search