2

I'm using Jekyll with Kramdown on Github, and I wonder whether there's a way to link to a line within a page. Say I have

some line here

and later I want to link to this line. If this line were a section then an ID would be autogenerated. But here it is just a simple line. I tried putting

some line here {#idhere}

and later link as

[link](#idhere)

but it didn't work.

Community
  • 1
  • 1
user7843034
  • 429
  • 4
  • 8

1 Answers1

1

Follow the block with a block inline attribute list: {: id="one_id"} or the short version: {: #one_id}

In your example:

some line here 
{: id="idhere"}

or

some line here 
{: #idhere}

and later link as

[link](#idhere)
marcanuy
  • 23,118
  • 9
  • 64
  • 113