docs-v2 icon indicating copy to clipboard operation
docs-v2 copied to clipboard

Automagically add relative link marker

Open danielbachhuber opened this issue 10 years ago • 6 comments

Github has a nice relative link marker on documentation:

image

We should add something similar to our documentation:

image

danielbachhuber avatar Oct 21 '15 14:10 danielbachhuber

@danielbachhuber - I understand the req.

In terms of implementation I propose:

  • Use the same "chain" icon as github, with the same functionality (visible on mouseover, click to follow the link).
  • Icon appears alongside any heading <h1-6> with an id attribute.
  • The icon is added by JS in the document's ready() function.

Does this sound good?

An alternative to the last point would be to add the icon's HTML during the build - if I understand correctly this is done with the redcarpet gem. I'm not familiar with this, but if it can be customised I could potentially do it this way.

adamf321 avatar Nov 03 '15 17:11 adamf321

JS sounds find to me if the Ruby approach is too difficult.

danielbachhuber avatar Nov 03 '15 18:11 danielbachhuber

IMO this should just be in done the jekyll templates

joehoyle avatar Nov 03 '15 18:11 joehoyle

@joehoyle - sounds reasonable, I'll look into this.

adamf321 avatar Nov 03 '15 18:11 adamf321

FWIW, we can't run arbitrary Ruby; Jekyll supports plugins and such, but GH Pages is locked down much tighter.

rmccue avatar Nov 04 '15 00:11 rmccue

Awesome - just came here to request this as I'd like to link to the docs halfway down.

wesbos avatar Feb 23 '16 18:02 wesbos