@sy-records/docsify-title-mark
v1.0.0
Published
A docsify plugin that adds flexible, hoverable marks to headings.
Maintainers
Readme
docsify-title-mark
A docsify plugin that adds flexible, hoverable marks to headings.
Usage
Load docsify and this plugin:
<script>
window.$docsify = {
titleMark: true,
};
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/dist/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/@sy-records/docsify-title-mark@1/dist/index.min.js"></script>Then add a mark at the end of any Markdown heading:
# Install [:mark optional]
## Advanced config [:mark beta|Available in the next release|info]The syntax is:
[:mark content|hover title|variant]Supported built-in variants are info, success, warning, and muted.
Options
You can also configure marks by heading id or heading text:
<script>
window.$docsify = {
titleMark: {
marks: {
'install': 'optional',
'#advanced-config': {
content: 'beta',
title: 'Available in the next release',
variant: 'info'
}
}
}
};
</script>Full options:
window.$docsify = {
titleMark: {
allowHTML: false,
className: '',
container: '.markdown-section',
content: '',
hoverContent: '',
marks: {},
selector: 'h1, h2, h3, h4, h5, h6',
style: true,
syntax: true,
title: '',
variant: ''
}
};Set style: false to provide your own CSS. Set titleMark: false to disable the plugin.
