Where to find code that generates ID names in the HTML pages in a GitHub page Jekyll theme

26 Views Asked by At

I see that the markdown headings have the headings as ID with spaces replaced with dashes in the generated HTML files.

I want to tinker with the code that is responsible for this so I can change the rules and replace some characters with some other characters. But I cannot seem to find where this code is.

Please help in finding the source files, for example, in this theme: https://github.com/pages-themes/minimal

1

There are 1 best solutions below

0
VonC On

This is more a feature provided par Jekyll itself, more precisely by gettalong/kramdown, a fast, pure Ruby Markdown superset converter used by Jenkins.

See for instance in lib/kramdown/parser/kramdown/header.rb#def parse_header_contents.