New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor links for the site's headers which have ID's #2342

Merged
merged 6 commits into from May 7, 2014

Conversation

Projects
None yet
5 participants
@parkr
Member

parkr commented May 7, 2014

For every header on the page inside the main content section which has an ID, it is assigned a clickable anchor that appears when the header is hovered over:

screen shot 2014-05-07 at 4 41 42 pm

Fixes #2330

parkr added a commit that referenced this pull request May 7, 2014

@parkr parkr merged commit 08a87ae into master May 7, 2014

1 check was pending

continuous-integration/travis-ci The Travis CI build is in progress
Details

@parkr parkr deleted the anchor-links branch May 7, 2014

parkr added a commit that referenced this pull request May 7, 2014

@benbalter

This comment has been minimized.

Contributor

benbalter commented May 7, 2014

💖

@doktorbro

This comment has been minimized.

Member

doktorbro commented May 8, 2014

Now the History’s top h2 is always #section. Every time you add a new header, the old links break.

Remember, the History is broken by design: #1508

@kleinfreund

This comment has been minimized.

Contributor

kleinfreund commented May 8, 2014

Something like #v-202, #v-202-bug-fixes, ... as ID's for the headings should work. Including the version number for the anchors won't break links for every new version.

The links won't look beautiful, but that's not the point, right?

@parkr

This comment has been minimized.

Member

parkr commented May 9, 2014

Honestly not sure how to achieve that without hand-writing the h2's. Want to do the honors, @penibelst? Would be a part of the Rakefile, in the site:history task.

@benbalter

This comment has been minimized.

Contributor

benbalter commented May 9, 2014

Why is the first div section? I suspect it's because the heading link is all numbers (which an anchor can't start with)? I suspect if you change e.g., 2.0.0 to v2.0.0 Kramdown will do the right thing and generate a proper permalink.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.