Using macros within tabs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using macros within tabs

kameshsampath
I am trying to get tabs on Antora generated site just like https://docs.couchbase.com/sync-gateway/2.5/getting-started.html and using https://gitlab.com/antora/antora-asciidoctor-extensions/blob/master/tabs-block/extension.js. But am not sure how to make the headings work inside included tab content, right now I see them rendered as raw texts
Reply | Threaded
Open this post in threaded view
|

Re: Using macros within tabs

kameshsampath
I found the trick, i need to put the tab content within AsciiDoc  delimiters to make it to work.

e.g.

[tabs]
====
tab1:
+
--
include::tab-doc1.adoc[]
--
tab2:
+
--
:a: 1
:b: 2
:c: 3
include::tab-doc2.adoc[]
--
====

tab-doc1.adoc
=====

= Tab 1

Asciidoc is awesome.  

=====

tab-doc1.adoc
=====

= Tab 2

[source,bash,subs="attributes"]
----
{a} + {b} = {c}
----

=====