Discourse Docs + Pavilion Layouts Plugin

AI-generated summary

In a support discussion about integrating the Pavilion Layouts Plugin with Discourse Docs, Fma965 asks how to display layouts on Docs pages, noting their absence on Docs - CyanLabs Official Community despite working elsewhere on the site. osioke tags keegan for input. keegan explains that the Layouts plugin currently doesn’t support custom contexts like the /docs route created by the Docs plugin, though it may be considered for future development. Fma965 seeks guidance on implementing a workaround, acknowledging limited Ruby experience. keegan points to a specific commit where angus added new contexts, suggesting it as a starting point. Fma965 thanks them and plans to review the code.

Hi All,

Does any one know how I can make the Layouts Plugin (Layouts - Pavilion) show on Discourse Docs pages

You can see an example of the side bar on any page on https://community.cyanlabs.net and then that it’s missing here Docs - CyanLabs Official Community

@merefield @keegan any ideas?

@Fma965 @osioke

Unfortunately, the Layouts plugin at this time doesn’t support custom contexts.

Although the layouts plugin supports a variety of Discourse routes, since the docs plugin creates a new custom route at /docs, it’s not currently possible to add layouts there.

Perhaps this is a feature we may consider including in the future.

Thanks,

Ofcourse everything is possible, any suggestions on where to look to implement this myself in a somewhat hacky way?

Ruby isn’t my language of choice but maybe I can still wing it somehow with some pointers?

@Fma965

Have a look at this commit:
https://github.com/paviliondev/discourse-layouts/commit/a09d135a6f90056dafa654f3d9dd19f4dfb0a6a9

where @angus added 3 new contexts for the plugin. It might point you in the right direction.

Many thanks :slight_smile: i will take a look shortly