Add Github style heading anchors to your book.
Add the plugin to your book.json
:
{
"plugins" : [ "anchors" ]
}
Github style heading anchors for your Gitbook
License: Apache License 2.0
On gitbook v3.0.0-pre1 they have changed the API, so now the plugin totally crash. Please update it to add support for upcoming versions.
Add Github style heading anchors to your book.
Normally on Github these anchor links are invisible until the user mouses over the heading, but that isn't the case when using this plugin. Is that intended or is there something wrong with my install?
Can't see the link icon properly when you hover over a heading with GitBook 1.0. If you update the plugin.css
a.plugin-anchor
rule to have padding-left: 40px
it works. I've no idea why ๐
By using gitbook 2.0.0, autocover raise the next error
hook 'page' used by plugin 'gitbook-plugin-anchors' is deprecated, and will be remove in the coming versions
This should be updated.
Hi,
We have updated to the latest gitbook version. Now, we have found that anchors are not working.
For example, you visit the Url, it is defined, but browser does not jump.
To fix it, we have added jQuery and a script with addcssjs plugin. In this way, location it forced to jump to the Url with anchor.
var target = window.location.hash;
window.location.hash = "";
$(document).ready(function() {
setTimeout(function() {
document.location.hash = target;
}, 50);
});
We're using Gitbook v2.6.5, and plugin version 0.5.0, and the anchor icon is too large.
The font-size
property for the span appears to be overridden by higher specificity CSS from Gitbook itself.
I've hacked a fix for it by including some extra CSS into our book:
a.plugin-anchor span {
font-size: 15px !important;
}
I'm not sure whether using !important
is the right approach, but it works. :-/
Hi rlmv,
I am Aleen (https://github.com/aleen42) , and the founder of GitBook Community in Google+: https://plus.google.com/communities/110696788983472771007, which aims to sharing books or plugins of GitBook, talking anything about it as well. Here I am sincerely inviting you to join us. ๐
Hi,
Thank you for your plugin, it's great.
But did you notice that it generates some warnings with Gitbook > 2.x. :
warn: hook 'page' used by plugin 'gitbook-plugin-anchors' is deprecated, and will be removed in the coming versions
Do you have plan to support Gitbook 2 and superior ?
Thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.