Markbind: Heading anchors missing in some places

Created on 15 Mar 2019  路  4Comments  路  Source: MarkBind/markbind

v1.20.0

Problem: heading anchors missing in some places
image

https://nus-te3201.github.io/2019/programming/toc/oop.html#exercise-create-stockitem-class

c.Bug 馃悰 p.Medium

Most helpful comment

Took a closer look - the headingIndexLevel was removed when removing the built-in search and integrating Algolia search (https://github.com/nus-te3201/2019/commit/782e89f0b9c1254fdd212528191c203add11b1b7#diff-16e7e892de236ee90eae713988c2ace5), which resulted in headingIndexLevel falling back to the default level.

I think there is some unintended coupling between the built-in search indexing and anchor generation. Perhaps it would be a good idea to separate the two.

All 4 comments

This was actually working in the previous weeks. Probably broke in v1.20.0

Are you referring to the anchor next to the Exercise : Create StockItem Class heading?

It seems to be a h4 heading. Looking at the site.json of the website, there is no headingIndexLevel specified. If unspecified, the default headingIndexLevel would be set to 3. The heading appears to be outside the headingIndexLevel and so no anchor is generated.

Took a closer look - the headingIndexLevel was removed when removing the built-in search and integrating Algolia search (https://github.com/nus-te3201/2019/commit/782e89f0b9c1254fdd212528191c203add11b1b7#diff-16e7e892de236ee90eae713988c2ace5), which resulted in headingIndexLevel falling back to the default level.

I think there is some unintended coupling between the built-in search indexing and anchor generation. Perhaps it would be a good idea to separate the two.

I think there is some unintended coupling between the built-in search indexing and anchor generation. Perhaps it would be a good idea to separate the two.

yes, that seems to be the case. Thanks for investigating @marvinchin

Was this page helpful?
0 / 5 - 0 ratings

Related issues

le0tan picture le0tan  路  7Comments

ang-zeyu picture ang-zeyu  路  4Comments

ang-zeyu picture ang-zeyu  路  6Comments

yamgent picture yamgent  路  6Comments

okkhoy picture okkhoy  路  3Comments