A
A
Alexander Bizikov2014-02-07 21:06:56
Markdown
Alexander Bizikov, 2014-02-07 21:06:56

Header id generation in makrdown

Good evening!
Wrote a blog on Jekyll, but faced a very unpleasant thing for me.
Articles are written in markdown, but that's okay. For some reason I don't understand, heading ids are generated:
### Я заголовок
As a result, it is generated:
<h3 id="section">Я заголовок</h3>
An example can be found on my blog .
At first I thought that I was doing something wrong, but other sites using Jekyll also have id in their headers, but not all of them.
Can you please tell me how to avoid setting id for h1..h5 in markdown?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iloveip, 2014-06-21
@bizikov

Previously, Jekyll used Maruku by default for markdown. In Maruku, it seems impossible to disable the automatic generation of id for headers. But you can change them, for example:
C version 2.0.0 markdown in Jekyll is Kramdown by default. There you can disable automatic id for headers. In the _config.yml file you need to specify:

kramdown:
  auto_ids: false

So you can either upgrade Jekyll to the new version, or set the default Kramdown to the old version and change the settings for auto_ids in _config.yml.
To set the default Kramdown in a previous version of Jekyll, in _config.yml you need to specify:
markdown: kramdown

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question