stargate / docs

Documentation for Stargate
Apache License 2.0
15 stars 24 forks source link

Explore collapsible sections in antora/asciidoc #43

Closed polandll closed 2 years ago

polandll commented 3 years ago

Note to self: JeffMorison @JeffMorison Jan 29 08:00 Hello Guys, has anyone implemented code to contract long code blocks such that it presents an expand/contract link on the generated HTML?

drykberg @drykberg Jan 29 08:09 @JeffMorison you mean like %collapsible? Because that would interest me too :) As far as I know, %collapsible itself is said to be supported by antora in the Q1/Q2 release

JeffMorison @JeffMorison Jan 29 08:14 @drykberg yeah pretty much.

djencks @djencks Jan 29 08:51 built-in %collapsible will come with Asciidoctor 2 integration. Last I heard that might or might not make it into Antora 3. There's a Ruby extension in the Asciidoctor docs extension section that is supposed to do the same thing and would be easy to port to javascript. @drykberg Missing asciidoctor 2 is not actually a problem here. I was hoping you could figure out what you set in .npmrc that prevented fetching the @djencks artifacts from the aws s3 urls.

Ewan Edwards @eskwayrd Jan 29 11:28 I’ve been implementing something similar to %collapsible in my own documentation, but not nearly as concise. For lengthy code samples, I add a specific role, limit, and then my UI applies javascript to let users expand/collapse the presentation. That part isn’t particularly hard, once you’re used to customizing your own Antora UI.

polandll commented 3 years ago

The collapsible sections are now implemented in antora 3.0.0-alpha.6 and work brilliantly. Requires us to upgrade from antora 2.3 -> 3.0.

polandll commented 2 years ago

Update to Antora 3.0.0 allows collapsible to be used. Note that AsciiDoc inside a collapsible section does not get rendered. You can use includes inside, though.

polandll commented 2 years ago

Example:

== What should I do if I find a bug?
.See the answer
[%collapsible%open]
====
- If you've found an issue while using Stargate, please file a bug in the
https://github.com/stargate/stargate[Stargate repo] and use the bug label.
It's also helpful to include the full stack trace and the Stargate and database
version that you are using so that we can efficiently debug.
- If you've found an issue with the documentation, please file an issue in the
https://github.com/stargate/docs[Stargate docs repo]. Pull requests are also
accepted!
====

== Why should I use Stargate when I already have an existing database?
.See the answer
[%collapsible]
====
Stargate provides APIs, data types and access methods that bring new capabilities
to existing databases.
Currently Stargate adds both REST and GraphQL APIs for CRUD access to data stored
in Apache Cassandra(R) and there are many more APIs coming soon.
Separating compute and storage also has benefits for maximizing resource
consumption in cloud environments.
When using Stargate with Cassandra, you can offload the request coordination
overhead from your storage instances onto Stargate instances
which has shown latency improvements in preliminary testing (results coming soon).
====
polandll commented 2 years ago

collapsible is now possible with antora 3+

ravic0812 commented 4 weeks ago

no it does not work when the command includes search engine parameter.