Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 1.68 KB

README_CN.md

File metadata and controls

74 lines (56 loc) · 1.68 KB

hexo-reference-plus

English | 简体中文

GIF 预览 (3mb)

使用markdown在你的hexo博客添加引用与脚注。

  • 自动编排序号

  • 使用 tippy.js 实现停留提示

  • 简单易用的语法

  • 在markdown中配置开关以减少不使用的页面体积

灵感来自 hexo-reference

安装

yarn add hexo-reference-plus

npm install hexo-reference-plus

使用

一共只需要三步:

首先,在你的markdown文件的front-matter区域设置refplus:true

---
title: hexo-reference-plus
date: 2021-09-24 15:49:08
refplus: true
---

然后,在文章末尾标注 references 区域,给每一个引用分配一个别名(推荐不要包括序号)

{% references %}
[mcf-2021]  Max C. Foo.  A way to write an article.[J] Journal of Kelaideng University Samwin School. 2021.3 300-321.
{% endreferences %}

最后,在你需要引用的位置标记上面你设置的别名

So here is the way what Max C. Foo(2021){% ref mcf-2021 %} do.

注意:你必须在参考区域前使用别名,即上面的内容需要在 references 区域之前。

完成。

配置

在你的 _config.yml 下添加以下配置项以控制 tippy.js 的开关。

# hexo-reference-plus
refplus:
  tippy: true

可以使用 hide 参数来隐藏引用区域。

{% references hide %}
[mcf-2021]  Max C. Foo.  A way to write an article.[J] Journal of Kelaideng University Samwin School. 2021.3 300-321.
{% endreferences %}