Skip to content

GreyTeardrop/spring-asciidoctor-extensions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 68.3%
  • JavaScript 20.9%
  • Shell 5.6%
  • CSS 5.2%