GreyTeardrop / spring-asciidoctor-extensions

Asciidoctor Extensions developed by the Spring team

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Asciidoctor Extensions

Using the extensions

The extensions can be used by adding a dependency to your Maven or Gradle build:

Gradle

Add a dependency on the extensions to the asciidoctor configuration:

asciidoctor 'io.spring.asciidoctor:spring-asciidoctor-extensions:version'

Maven

Add a dependency to your existing configuration of the asciidoctor-maven-plugin:

<plugin>
	<groupId>org.asciidoctor</groupId>
	<artifactId>asciidoctor-maven-plugin</artifactId>
	<dependencies>
		<dependency>
			<groupId>io.spring.asciidoctor</groupId>
			<artifactId>spring-asciidoctor-extensions</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
</plugin>

Available extensions

Code block switch

Post-processes Asciidoctor’s HTML output to collapse multiple code blocks into one and provides tabs that can be used to switch between them. Requires one block that has a role="primary" attribute and one more blocks that have a role="secondary" attribute. The tabs are named using the block titles.

For example:

[source,xml,indent=0,role="primary"]
.Maven
----
<dependency>
    <groupId>com.example</groupId>
    <artifactId>some-library</artifactId>
    <version>1.2.3</version>
</dependency>
----

[source,indent=0,role="secondary"]
.Gradle
----
compile 'com.example:some-library:1.2.3
----

About

Asciidoctor Extensions developed by the Spring team


Languages

Language:Java 68.4%Language:JavaScript 20.9%Language:Shell 5.6%Language:CSS 5.2%