magu-plugin-anchor
Magu plugin to headline anchorify
Install
yarn add magu-plugin-anchornpm install magu-plugin-anchor
Usage
;
Options
icon
(default:true
)Whether to display link icon (using octicon)selector
(default:h1,h2,h3,h4,h5,h6
)Specify the selector to processanchorTemplate
(default:<a class="md__anchor" href="#{text}">{icon}{text}</a>
)Specify template of a tagthis is using [sindresorhus/pupa](https://github.com/sindresorhus/pupa), and it's using like `pupa(options.anchorTemplate, {text, icon})`iconOptions
(defualt:iconOptions: {class: 'md__anchor-icon md__anchor--level-{level}'}
)Specify svg options of OcticonsRefer to around [octicons#class](https://www.npmjs.com/package/octicons#class)transformID
(default: voca.kebabCase)Specify this when you want to change the headline text and the id value to be set(e.g.) `transformID(id) {return 'foo'}`
Example
Will compile of this content
# a## i### u#### え##### お
;
result like this
aiuえお
License
The MIT License (MIT) Copyright (c) 2016 nju33 nju33.ki@gmail.com