Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webmasterish/vuepress-plugin-autonav
Auto nav links plugin for VuePress 1.x
https://github.com/webmasterish/vuepress-plugin-autonav
links menu nav nav-links vue vuepress vuepress-plugin
Last synced: 3 months ago
JSON representation
Auto nav links plugin for VuePress 1.x
- Host: GitHub
- URL: https://github.com/webmasterish/vuepress-plugin-autonav
- Owner: webmasterish
- License: mit
- Created: 2019-01-03T17:45:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-08T20:27:16.000Z (over 5 years ago)
- Last Synced: 2024-07-21T04:02:08.481Z (4 months ago)
- Topics: links, menu, nav, nav-links, vue, vuepress, vuepress-plugin
- Language: JavaScript
- Size: 13.7 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# VuePress Plugin Auto Nav Links
> Auto nav links plugin for VuePress 1.x
[![Build Status](https://img.shields.io/travis/webmasterish/vuepress-plugin-autonav/master.svg?style=flat-square)](https://travis-ci.org/webmasterish/vuepress-plugin-autonav)
[![npm version](https://img.shields.io/npm/v/vuepress-plugin-autonav.svg?style=flat-square)](http://npm.im/vuepress-plugin-autonav)
[![Greenkeeper badge](https://badges.greenkeeper.io/webmasterish/vuepress-plugin-autonav.svg?style=flat-square)](https://greenkeeper.io/)
[![MIT License](https://img.shields.io/npm/l/express.svg?style=flat-square)](http://opensource.org/licenses/MIT)## What
Auto populates `themeConfig.nav` with top level pages if it's not already set.
Using a page `frontmatter` you can:
- Enable/disable adding a link to the navbar - a typical would be if you don't
want to add the home page
- Page order## Install
```sh
$ npm install -D vuepress-plugin-autonav# or
$ yarn add -D vuepress-plugin-autonav
```## Usage
Add `vuepress-plugin-autonav` in your site or theme config file.
> See [official docs on using a plugin](https://vuepress.vuejs.org/plugin/using-a-plugin.html)
```js
// .vuepress/config.js
// or
// .vuepress/theme/index.js// set your global autonav options - override in page frontmatter `autonav`
const autonav_options = {
enable: true
};module.exports = {
plugins: [
[ 'autonav', autonav_options ]
]
}
```### Page `frontmatter`
```md
---title: Page Title
autonav:
enable: true
order: -1---
```
## Reference
- VuePress official [plugin docs](https://vuepress.vuejs.org/plugin/)
- VuePress official [Navbar Links](https://vuepress.vuejs.org/theme/default-theme-config.html#navbar-links)
- VuePress official [Front Matter](https://vuepress.vuejs.org/guide/frontmatter.html)## Related Plugins
- [VuePress Plugin Auto Meta](https://github.com/webmasterish/vuepress-plugin-autometa)
- [VuePress Plugin Minimal Google Analytics](https://github.com/webmasterish/vuepress-plugin-minimal-analytics)## License
MIT © [webmasterish](https://webmasterish.com)