1.0.2 • Published 1 year ago

hexo-pandoc-header-anchor v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

hexo-pandoc-header-anchor

Add anchors to each header like markdown-it.

Getting started

Prerequisites

hexo-renderer-pandoc should be used as the renderer of hexo.

pandoc and panflute should be installed. Note that the version of panflute should match the version of pandoc: https://github.com/sergiocorreia/panflute#supported-pandoc-versions.

Install

npm install hexo-pandoc-header-anchor --save

Add the following configurations to _config.yml:

pandoc:
  filters:
    - node_modules/hexo-pandoc-header-anchor/header-anchor.py

Then hexo clean && hexo s -g to preview effects. is the anchor of the corresponding header. Example: https://seekstar.github.io/2022/03/10/a-collection-of-matrix-groups/

Options

pandoc:
  meta:
    - header_anchor_str: '¶'
    # 'left' | 'right'
    - header_anchor_side: 'left'

The above values are default. You may change them to customize.

LICENSE

This project is licensed under the ISC License.

Credits

This project is inspired by hexo-pandoc-tippy and leonfancy.github.io/pandocfilters/header_link.py.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago