The discussion revolves around adding the DiscoTOC theme component to published pages in Discourse. hellekin initiated the conversation, suggesting it would be useful to have a table of contents (ToC) on published pages. RGJ pointed out that theme components are not applied to published pages, while joffreyjaffeux confirmed that page publishing does not currently support theme components or plugins.
RGJ asked if simple jQuery code could be inserted into published pages, but joffreyjaffeux expressed concerns about potential errors with other themes. Multiple users, including alehandrof, sbernhard, and craigconstantine, requested support for DiscoTOC on published pages, but joffreyjaffeux and Canapin indicated that this is unlikely due to technical limitations and lack of plans to extend JavaScript features to published pages.
This makes me think, @j.jaffeux, that Discourse plugins are applied to published pages (e.g., footnotes) but theme components are not (e.g., table of contents). It might be tricky to implement since some components are not necessarily useful in the context of pages, but ToCs are definitely useful. Any chance we can have it?
I can understand that, after all there are no Ember components on those pages.
My question is just about some simple jQuery code (document.ready()) and things like GA, GTM. The simple and plain Javascript stuff, so to say. It would be sufficient if the </head> and <footer> sections of the theme component would be inserted as-is.
FWIW, my need is to create several pages worth of related content. Ideally, I’d want separate pages, linked by some kind of navigation. AFAICT, this doesn’t seem possible with the current implementation. I requested the TOC as a workaround – having all the content on one page, navigable by the TOC.
The TOC would be great to have eventually, but in my case what I was really looking for is separate, but inter-connected pages. I’ll find another solution for the moment. But is something like this in the cards at all for the future?
Is there a plan, that the TOC is also visible for published pages? Page publishing was a feature introduced in discourse 2.5? This would be a huge benefit of this theme component!