Allow to expand the table of contents headers

Created on 12 December 2023, 7 months ago

Problem/Motivation

We had a requirement where we wanted to exclude some headers (e.g. //article[class]//h2) while including the parent itself (//article[class]). The problem was that we have a wrapper container and we want the "Back to top" link above the container, not inside.

Excluding was easy, but Toc.php is quite tied to hN, so there is no easy way to do this, if any.

In our case was a visual issue mostly, so we moved the "back to top" to the parent element via js. But looks like a hack to me.

Proposed resolution

Would love if someone has better ideas to allow to expand the ToC contents to include other items aside of hN.
Might be a won't fix though.

Remaining tasks

Discuss.

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024