automatically display all Level 1 headings (H1) of a subpage directly below its internal link (e.g., /wiki/subpage) on any page containing such links
Lexcao
No code changes to Wiki.js core or Docker files needed.
Preferably implemented via the Wiki.js admin UI (e.g., theme customization, code injection).
The solution should:
Detect all internal links pointing to subpages (e.g., /wiki/subpage-slug).
Fetch the subpage’s content (via Wiki.js API, using the user’s JWT from localStorage).
Extract all H1 headings from the subpage’s HTML content.
Render these H1 titles in a small, non-intrusive container below the original link.
Handle dynamic content (e.g., links loaded via AJAX/pagination) and cache results to avoid redundant API calls."