Website render with pandoc and citeproc
Recently, I rebuilt my blog with Hexo engine from Jekyll, and I forked hexo-theme-fluid.
However, I had an issue in rendering bibliography with the default render engine. I check the official document from Hexo and pandoc, and motivatited by the discuss.
I switch the render engine from marked to pandoc by:
1
2npm uninstall hexo-renderer-marked --save
npm install hexo-renderer-pandoc --save
Then, I add the following code to the _config.yml
file:
1
2
3
4
5
6
7
8
9
10
11pandoc:
filters:
extra:
- citeproc:
- bibliography: "biblio.bib"
- csl: "chicago.csl"
template:
meta:
- linkCitations: true
- reference-section-title: Reference
- notes-after-punctuation: truebiblio.bib
and
chicago.csl
files to the root directory of
your web not /source
.
When you want to cite a paper, you only need to enter the entrykey
@paper1
or [@paper1]
. The paper will render a
list of reference below the last section of the page.