AddTocOutputFormat
in package
Render the table of contents beside whatever else the project renders.
Enabling the extension is meant to be the whole of enabling the file, so the format has to end up in the project's output formats without the project having to name it. It cannot be put there through the configuration: an explicitly configured "output-format" replaces the default ["html", "interlink"] rather than extending it, so a project that configures nothing would end up rendering a table of contents and no HTML.
This is the last moment the list can still be added to -- the settings are final by now, the CLI options included, and the render command reads them afterwards -- so appending here leaves every other format untouched. A project rendering only "rst" keeps doing that and gains the table of contents beside it, and one that named "llm_toc" itself does not get it twice.
Table of Contents
Methods
- __invoke() : void
Methods
__invoke()
public
__invoke(PostProjectNodeCreated $event) : void
Parameters
- $event : PostProjectNodeCreated