Stephan Herby
Just in case you want to see a Index on Aside part of an article, with smooth scroll and sticky when scrolling down, you can have a look here :
pacificfoodlab.nc/actualites/journee-de-...es-chefs-de-cantines
How I made It ?
How to insert the Index tag in content:
First I made a 2 columns template for my content
Left col A is 1/3 with all little info (gallery, read more, sources... and QuickIndex (Index de l'article).
Right col B is 2/3 with content.
I used Flex class "uk-flex-first uk-first-column" so the col B appear on left, and col A on right.
This allows me to display the index on the right "after" the content, whereas in the code it is before, so the {index} tag works.
Then at the end of the col A I inserted the tag {index}
Use rereplacer for the Scroll, sticky and an icone before the title:
First for the scroll part, I created a first Rereplacer where search for :
and replace with
class="index-link" uk-scroll="offset: 130"
Then a second rereplacer for Sticky where search for:
and replace with
role="directory" uk-sticky="offset: 130; media: 770"
And a last Rereplacer with search for:
<p class="index-header">Index de l'article</p>
and replace with
<p class="index-header uk-text-uppercase uk-h5 uk-text-muted"><span uk-icon="icon: list; ratio: 1.2" class="uk-margin-small-right uk-icon"></span>Index de l'article</p>
And that's all. Now I have a beautiful index on right col, appear only if needed.
Thanks to Peter who suggested me the idea of using Rereplacer 😉
I hope 3 is not too much 😜