Jekyll link inside the page

I am using Jekyll on Github and I am wondering if there is a way to link it to a section within a page. Let's say I have a section like

## Section 1 ##
section content 

      

and then on the same page that I want to link to that section. I found a link to another page on the blog and make footnotes , but not this.

As a side note, I use markdown: kramdown

in my_config.yml

+3


source to share


1 answer


kramdown supports automatic generation of header IDs if auto_ids is set to true (this is the default). This is done by converting the untransformed, that is, simple, title

So, in the above example, ## Section 1 ##

it will generate the following id: id="section-1"

then the anchor is bound to element A:



<A href="#section-1">Section One</A>

      

Or in regular kramdown / markdown: [Section 1](#section-1)

+3


source







All Articles