1.1.0 ā€¢ Published 4 years ago

mbdocsify-autoheaders v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Getting started

Installation

  1. Configure the docsify-autoHeaders:
<script>
window.$docsify = {
    autoHeading: {
        separator: '',
        levels:    '',
        scope:     ''
    },
};
</script>
  1. Insert script into docsify document:
<script src="docsify-autoHeaders.js"></script>

Configuration

There are some options available for the docsify-autoHeaders:

settingoptions
separatorhow you'd like the numbers to be separated. decimal, dash, or bracket
levelsheading levels to target 1-6
scopethe 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

Example output

Contributing

  1. Clone the repo:
git clone https://github.com/markbattistella/docsify-autoHeadings.git
  1. Create your feature branch: git checkout -b my-feature

  2. Commit your changes: git commit -am 'Add some feature'

  3. Push to the branch:

git push origin my-new-feature
  1. Submit a pull request

Roadmap

  • Allow custom separators
  • Allow the scope to be either a class or ID
  • Convert it to usable outside Docsify

Author: @me

  • šŸ”­ Iā€™m currently working on some secret projects
  • šŸŒ± Iā€™m learning
  • šŸ“« Reach me: Twitter šŸ¦

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago