PDF插件

安装

本地环境: npm install --save hexo-pdf

vercel环境:在项目 settingsINSTALL COMMAND中增加 npm install --save hexo-pdf

用法

  1. PDF
1
{% pdf http://7xov2f.com1.z0.glb.clouddn.com/bash_freshman.pdf %}

_config.yml设置 post_asset_folder: true

1
{% pdf bash_freshman.pdf %}


2. Google drive

1
{% pdf https://drive.google.com/file/d/0B6qSwdwPxPRdTEliX0dhQ2JfUEU/preview %}

  1. Slideshare
1
2
Slideshare
{% pdf http://www.slideshare.net/slideshow/embed_code/key/8Jl0hUt2OKUOOE %}

目录插件

安装

本地环境: npm install --save hexo-toc

vercel环境:在项目 settingsINSTALL COMMAND中增加 npm install --save hexo-toc

配置

根目录 _config.yml添加

1
2
toc:
maxdepth: 3

使用

1
<!-- toc -->

脚注插件

安装

本地环境: npm install --save hexo-footnotes

vercel环境:在项目 settingsINSTALL COMMAND中增加 npm install --save hexo-footnotes

配置

根目录 _config.yml添加

1
2
plugins:
- hexo-footnotes

使用

1
2
3
4
footnote1
1

展示


加密插件

安装

1
npm install --save hexo-blog-encrypt

配置

根目录 _config.yml添加

1
2
3
4
5
6
7
8
9
10
# Security
encrypt: # hexo-blog-encrypt
abstract: 有东西被加密了, 请输入密码查看.
message: 您好, 这里需要密码.
tags:
- {name: tagName, password: 密码A}
- {name: tagName, password: 密码B}
theme: surge
wrong_pass_message: 抱歉, 这个密码看着不太对, 请再试试.
wrong_hash_message: 抱歉, 这个文章不能被校验, 不过您还是能看看解密后的内容.

使用

  1. 文章信息头添加(无需修改_config)

    1
    2
    3
    title: Hello World
    date: 2022-07-12 12:12:21
    password: 12356
  2. 标签加密(需配置_config)

    1
    文章信息头中添加加密的tag即可

链接优化

安装

1
2
npm install hexo-abbrlink --save

配置

站点配置文件

1
2
3
4
5
6
permalink: posts/:abbrlink.html
#abbrlink配置
abbrlink:
alg: crc32 # 算法:crc16(default) and crc32
rep: dec # 进制:dec(default) and hex

参考

  1. https://github.com/superalsrk/hexo-pdf

  1. 1.footnote content
  2. 1.footnote content

    footnote