Adds the _generate_toc method that get the headings from a discourse document and creates a toc object detailing the headings and there associated potion in the pages hierarchy.
QA
You can include this PR in place of canonicalwebteam.discourse in your requirements.txt and then run the project as normal.
For testing purposes I have create a test-topic on discourse which can be reached through u.com with the extension /core/docs/test-topic
Currently it does not support toggalable TOC or a headings range
Done
_generate_toc
method that get the headings from a discourse document and creates a toc object detailing the headings and there associated potion in the pages hierarchy.QA
/core/docs/test-topic