Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theme-next/hexo-theme-next-anchor
A NexT plugin that adds an anchor to every heading.
https://github.com/theme-next/hexo-theme-next-anchor
anchor hexo-theme
Last synced: about 20 hours ago
JSON representation
A NexT plugin that adds an anchor to every heading.
- Host: GitHub
- URL: https://github.com/theme-next/hexo-theme-next-anchor
- Owner: theme-next
- License: lgpl-3.0
- Archived: true
- Created: 2019-07-15T13:45:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-08T05:20:34.000Z (about 5 years ago)
- Last Synced: 2024-08-11T17:08:57.612Z (3 months ago)
- Topics: anchor, hexo-theme
- Language: JavaScript
- Size: 9.77 KB
- Stars: 6
- Watchers: 9
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-theme-next-anchor
[![travis-image]][travis-url]
[![hexo-image]][hexo-url]
[![npm-image]][npm-url]
[![lic-image]](LICENSE)A NexT plugin that adds an anchor to every heading.
## Installation
![size-image]
[![dm-image]][npm-url]
[![dt-image]][npm-url]Go to your Hexo root directory, then run this command:
```bash
npm i hexo-theme-next-anchor
```## Usage
> You need to write following options into your NexT configuration file.
```yml
anchor:
enable: true
color: '#0e83cd'
position: right # If left, anchors will always be visible.
margin: 7px
text: '#'
icon:
# If true, the `text` option will be ignored.
enable: false
# By default, NexT has built-in FontAwesome support.
# This option means `font-family: FontAwesome`, so DO Not change it.
# Also you can choose ForkAwesome, but that's another story.
font: FontAwesome
content: \f0c1 # CSS content for FontAwesome & ForkAwesome.
```## Thanks
This plugin was modified from [Hexo Site](https://github.com/hexojs/site/blob/e7b12f2f3da2f8f43618e6994668a77bb1ba14d2/scripts/helpers.js#L104-L119).
[travis-image]: https://img.shields.io/travis/com/theme-next/hexo-theme-next-anchor?style=flat-square
[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%203.0-blue?style=flat-square
[npm-image]: https://img.shields.io/npm/v/hexo-theme-next-anchor?style=flat-square
[lic-image]: https://img.shields.io/npm/l/hexo-theme-next-anchor?style=flat-square[size-image]: https://img.shields.io/github/languages/code-size/theme-next/hexo-theme-next-anchor?style=flat-square
[dm-image]: https://img.shields.io/npm/dm/hexo-theme-next-anchor?style=flat-square
[dt-image]: https://img.shields.io/npm/dt/hexo-theme-next-anchor?style=flat-square[travis-url]: https://travis-ci.org/theme-next/hexo-theme-next-anchor?branch=master
[hexo-url]: https://hexo.io
[npm-url]: https://www.npmjs.com/package/hexo-theme-next-anchor