AnchorJS

在文档中添加深层锚链接。「Add deep anchor links to your docs.」

Github stars Tracking Chart

AnchorJS Build Status

A JavaScript utility for adding deep anchor links (like these) to existing page content. AnchorJS is lightweight, accessible, and has no dependencies.

See Live Examples in the Documentation.

Anchoring links

Installation

Download AnchorJS using npm,

npm install anchor-js

or bower:

bower install anchor-js --save-dev

(or just download it from github).

Then include the anchor.js file (or anchor.min.js) in your webpage.

<script src="anchor.js"></script>

You could also include it via a CDN like CDNJS or jsDelivr.

Usage

See the Documentation for detailed instructions.

Compatibility

Currently Supports: IE9+ and modern browsers

Contributing devDependency Status

To contribute:

  1. Fork/Clone the repo.
  2. Make your changes.
  3. Write tests as needed.
  4. Run tests locally to confirm everything is working:
    • Install test modules: Run npm ci
    • Run all tests: npm test
  5. Minify the code: npm run release
  6. Submit a Pull Request.

License

Licensed with the MIT License.

Main metrics

Overview
Name With Ownerbryanbraun/anchorjs
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2013-11-09 05:19:05
Pushed At2025-03-13 22:13:32
Last Commit At
Release Count27
Last Release Name5.0.0 (Posted on )
First Release Name0.1.0 (Posted on )
用户参与
Stargazers Count890
Watchers Count18
Fork Count57
Commits Count300
Has Issues Enabled
Issues Count83
Issue Open Count3
Pull Requests Count87
Pull Requests Open Count1
Pull Requests Close Count25
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private