mirror of
https://github.com/caddyserver/website.git
synced 2025-04-27 23:46:16 -04:00
docs: Add anchor links to headers (#11)
* Add anchor links to headers * Removed the dependency!
This commit is contained in:
parent
d1997764cf
commit
44f6195f31
2 changed files with 23 additions and 0 deletions
|
@ -12,4 +12,9 @@ $(function() {
|
|||
$currentPageLink = $('main nav a[href="/docs/json/"]');
|
||||
}
|
||||
$currentPageLink.addClass('current');
|
||||
|
||||
// add anchor links, inspired by https://github.com/bryanbraun/anchorjs
|
||||
$('article h1[id],h2[id],h3[id],h4[id],h5[id],h6[id]').each(function() {
|
||||
$(this).append($('<a href="#'+this.id+'" class="anchor-link" aria-label="Anchor"></a>'));
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue