Skip to content

dribble-njr/vuepress-plugin-ordered-header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Vuepress Plugin Ordered Header

This is a vuepress plugin for ordering headers in the sidebar.

Like this:

# header 1

## header 1-1

### header 1-1-1

## header 1-2

# header 2

And the sidebar will be:

1 header 1

1.1 header 1-1

1.1.1 header 1-1-1

1.2 header 1-2

2 header 2

Installation

You can install it via npm or other.

npm install vuepress-plugin-ordered-header

Usage

In vuepress config file, add the plugin to the plugins array.

import orderedHeader from "vuepress-plugin-ordered-header";

module.exports = {
  plugins: [orderedHeader],
  markdown: {
    headers: {
      level: [2, 3, 4],
    },
  },
};

If you use vuepress-theme-hope,you also need to add the following config in theme:

export default hopeTheme(
  headerDepth: 3, // the depth header you want to render.
)

About

A vuepress plugin for ordering headers in the sidebar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published