Raku/doc-website

Add an index after Table of Contents

Closed this issue · 1 comments

Many files have X< display | index-entry > markup. In the RakuDoc specification, the clear intention is for the 'index entry' part to be contained in an Index.

Although Table of Contents were created on a per-file basis for each HTML page in the first web generators, the Index was not generated.

Proposal is to render the Index (only if there are indexed items on a page) and place it after the Table of Contents. Similar to the Table of Contents, the Index is filtered to match a search input. As with a Table of Contents, clicking on an item moves the browser window to the relevant position.

The Indexed data is used in the overall site Search function, but it is not visible on a page. By making it visible on a page, it adds another way to look for relevant information, but in a wider context than is possible in a Search function.

I have implemented an Index feature on new-raku eg operators
Open the Tables of Contents panel on the left, then click on the 'Index' tab. Click on an item.
The flaw at the moment is that the location is placed at the top of the browser window, under the Nav bar.
This also happens when going to a heading from Table of Contents.
There is a work-around. But I can't remember it.
Any comments? @Raku/core @coke