I'am using Jekyll with the Minimal Mistakes template and facing a problem with the fragment header generation.
Here is an example..
If you put a header into your *.md page like:
## Fuß- und Radentscheid?
you get this in you final html:
<h2 id="fuß--und-radentscheid">Fuß- und Radentscheid?</h2>
Note that the Fragment identifier was added.
Now I want to set a link that points to this ID:
- [Fuß- und Radentscheid?](#{{ "Fuß- und Radentscheid?" | slugify: "raw" }})
## Fuß- und Radentscheid?
Using the slugify function I try to generate the correct string that matches the one in the fragment identifier.
But Jekyll (or maybe Kramdown) generates that from it:
<ul>
<li><a href="#fuß--und-radentscheid?">Fuß- und Radentscheid?</a></li>
</ul>
<h2 id="fuß--und-radentscheid">Fuß- und Radentscheid?</h2>
Please note that the question sign is still present in the anchor href.
I've tried all the Slugify options and some combinations with other Liquid filters, but can't find one that generates the same string as the header fragment ID.
I know its easy to work around via delete or replace the question sign but I want to have a solid solution for putting any string in and get the same result as in the automatic generated fragment identifier.
Edit:
Another example:
[foobar?](#{{ "Foo- bar" | slugify }})
## Foo- bar
generates:
<p><a href="#foo-bar">foobar?</a></p>
<h2 id="foo--bar">Foo- bar</h2>