1.1.0 ā¢ Published 4 years ago
mbdocsify-autoheaders v1.1.0
Getting started
Installation
- Configure the
docsify-autoHeaders
:
<script>
window.$docsify = {
autoHeading: {
separator: '',
levels: '',
scope: ''
},
};
</script>
- Insert script into docsify document:
<script src="docsify-autoHeaders.js"></script>
Configuration
There are some options available for the docsify-autoHeaders
:
setting | options |
---|---|
separator | how you'd like the numbers to be separated. decimal , dash , or bracket |
levels | heading levels to target 1-6 |
scope | the ID of the holding element. for Docsify this is normally #main but I guess if you have html inside the .md then you can tie it to that instead |
Usage
At the top of your md
files add the following snippet:
@autoHeader:
At the end of the identifier, add the section starting number. If you don't have that it won't auto number (good for pages not needing numbering).
You can :heart: have a starting header at 0
using:
@autoHeader:0
Example
@autoHeader:34
# Black Books
## Season 2
### Episode 1
#### Characters
- Bernard
- Fran
#### Quotes
You! What have you been telling Kate? She thinks I'm
the renaissance. I have to go along with all this
"reclusive genius" stuff... she's going to be very
upset when she finds out I'm a reclusive wanker.
Example output
Contributing
- Clone the repo:
git clone https://github.com/markbattistella/docsify-autoHeadings.git
Create your feature branch: git checkout -b my-feature
Commit your changes: git commit -am 'Add some feature'
Push
to the branch:
git push origin my-new-feature
- Submit a
pull
request
Roadmap
- Allow custom separators
- Allow the scope to be either a
class
orID
- Convert it to usable outside Docsify
Author: @me
- š Iām currently working on some secret projects
- š± Iām learning
- š« Reach me: Twitter š¦