Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
A very common desire (and rarely done due to the difficulty of it) is to include snippets of code or other things in the documentation sites. This new plugin would add a standard way of registering "snippets" with Orchid that could be embedded anywhere as a TemplateTag.
Something like this was implemented already for Strikt, but that was very ad-hoc and crafted for that Orchid site. This would need to be a more general solution that can be very easily set up and used by anyone.
A new plugin,
Nothing is blocking work from being started on this feature. It should be fairly easy to implement and would be a good candidate for someone looking to get started contributing to Orchid, as it introduces some of the main concepts around plugin creation and indexing.
For what it is worth, it is very possible to use AsciiDoc plugin and then use the include directive to achieve most of what is functionally described.
Got it working to load source files (java) extracting snippets into a file, works great, it is dependent on this small MR getting through though: #347 to enable the include directive.
happy to provide more details if needed.
I didn't realize that the AsciiDoc includes could handle portions of a file instead of the whole thing. Really cool!
This plugin proposal is intended to work across all markup languages and so can't rely on AsciiDoc's native functionality, but it should definitely still work for migrating existing AD content to Orchid. I'll get your PR merged in shortly.
Could be nice if supports multi languages snippets like in Kotlin docs, Android docs and Gradle docs,
A developer from Gradle wrote a blog post about it, is built manually, you can check it here