-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new asciidoc-maven-site-parser-example example
* Rename asciidoc-maven-site-example to asciidoc-maven-site-converter-example
- Loading branch information
1 parent
feee067
commit a940e10
Showing
22 changed files
with
471 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
= Asciidoctor Maven Plugin (Converter Module): AsciiDoc Site Example | ||
|
||
An example project that demonstrates how to process AsciiDoc in a Maven site using the Asciidoctor Converter Doxia Module. | ||
|
||
== Usage | ||
|
||
Build the site by invoking the `site:site` goal: | ||
|
||
$ mvn site:site | ||
|
||
Open the file _target/site/hello.html_ to see the output generated from the AsciiDoc source _src/site/asciidoc/hello.adoc_. | ||
|
||
Open the file _target/site/index.html_ to see the output generated for the entire site including the link to the `hello` document. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
asciidoc-maven-site-example/README.adoc → ...doc-maven-site-parser-example/README.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.asciidoctor.maven</groupId> | ||
<artifactId>asciidoc-maven-site-parser-example</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<name>AsciiDoc Maven Site Example</name> | ||
<description>An example project that demonstrates how to process AsciiDoc in a Maven site using the Asciidoctor Maven plugin.</description> | ||
|
||
<!-- All Maven properties are injected as Asciidoctor attributes. | ||
Reference them with the same name replacing dots by dashes (e.g. {jruby-version}). --> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<asciidoctor.maven.plugin.version>3.0.0</asciidoctor.maven.plugin.version> | ||
<asciidoctorj.version>2.5.11</asciidoctorj.version> | ||
<jruby.version>9.4.5.0</jruby.version> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>3.12.1</version> | ||
<configuration> | ||
<!-- Disable generateReports if you don't want to include the built-in reports --> | ||
<generateReports>true</generateReports> | ||
<generateSitemap>true</generateSitemap> | ||
<relativizeDecorationLinks>false</relativizeDecorationLinks> | ||
<locales>en</locales> | ||
<inputEncoding>UTF-8</inputEncoding> | ||
<outputEncoding>UTF-8</outputEncoding> | ||
<asciidoc> | ||
<!-- Optional site-wide AsciiDoc attributes --> | ||
<attributes> | ||
<icons>font</icons> | ||
<!-- Add required rouge styles in '/css/site.css' --> | ||
<source-highlighter>rouge</source-highlighter> | ||
<toclevels>2</toclevels> | ||
</attributes> | ||
</asciidoc> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.asciidoctor</groupId> | ||
<artifactId>asciidoctor-parser-doxia-module</artifactId> | ||
<version>${asciidoctor.maven.plugin.version}</version> | ||
</dependency> | ||
<!-- Comment this section to use the default jruby artifact provided by the plugin --> | ||
<dependency> | ||
<groupId>org.jruby</groupId> | ||
<artifactId>jruby</artifactId> | ||
<version>${jruby.version}</version> | ||
</dependency> | ||
<!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin --> | ||
<dependency> | ||
<groupId>org.asciidoctor</groupId> | ||
<artifactId>asciidoctorj</artifactId> | ||
<version>${asciidoctorj.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<reporting> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-project-info-reports-plugin</artifactId> | ||
<version>3.5.0</version> | ||
</plugin> | ||
</plugins> | ||
</reporting> | ||
|
||
</project> |
11 changes: 11 additions & 0 deletions
11
asciidoc-maven-site-parser-example/src/site/asciidoc/_attributes.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
== Attributes | ||
|
||
.Built-in | ||
asciidoctor-version:: {asciidoctor-version} | ||
safe-mode-name:: {safe-mode-name} | ||
docdir:: {docdir} | ||
|
||
.Maven properties | ||
asciidoctor.maven.plugin.version:: {asciidoctor-maven-plugin-version} | ||
asciidoctorj.version:: {asciidoctorj-version} | ||
jruby.version:: {jruby-version} |
1 change: 1 addition & 0 deletions
1
asciidoc-maven-site-parser-example/src/site/asciidoc/_include.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
included content |
60 changes: 60 additions & 0 deletions
60
asciidoc-maven-site-parser-example/src/site/asciidoc/article.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
= AsciiDoc is Writing Zen | ||
Doc Writer <doc[email protected]> | ||
//Junior Writer <junior[email protected]> | ||
v1.0, 2014-08-08 | ||
//:toc: | ||
:icons: font | ||
:source-highlighter: rouge | ||
:sectanchors: | ||
//:compat-mode: | ||
|
||
_Zen_ in the *art* of writing `plain text` with https://asciidoc.org[AsciiDoc]. | ||
|
||
[TIP] | ||
Use https://asciidoctor.org[Asciidoctor] for the best AsciiDoc experience.footnote:[Not to mention the best looking output!] | ||
Then icon:twitter[role=aqua] about it! | ||
|
||
toc::[] | ||
|
||
== Sample Section | ||
|
||
=== Unordered list | ||
|
||
* item 1 | ||
* item 2 | ||
|
||
=== Ordered list | ||
|
||
. item 1 | ||
. item 2 | ||
|
||
=== Table | ||
|
||
[caption=] | ||
.Ruby platforms | ||
|=== | ||
|Name |Language | ||
|
||
|MRI |C | ||
|JRuby |Java | ||
|Opal |JavaScript | ||
|Rubinius |Ruby | ||
|=== | ||
|
||
=== Code blocks | ||
|
||
[source,ruby] | ||
---- | ||
puts "Hello, World!" | ||
---- | ||
|
||
[source,java] | ||
---- | ||
class HelloWorld { | ||
public static void main(String[] args) { | ||
System.out.println("Hello, World!"); | ||
} | ||
} | ||
---- | ||
|
||
include::_attributes.adoc[] |
16 changes: 16 additions & 0 deletions
16
asciidoc-maven-site-parser-example/src/site/asciidoc/hello.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
= Hello, AsciiDoc! | ||
//:icons: font | ||
|
||
This file was converted from AsciiDoc to HTML by the Maven Site module of the Asciidoctor Maven Plugin. | ||
|
||
image::images/tiger.png[Ghostscript Tiger] | ||
_By Ghostscript authors (GPL Ghostscript SVN: tiger.eps) [GPL (https://www.gnu.org/licenses/gpl.html)], via Wikimedia Commons_ | ||
|
||
[TIP] | ||
==== | ||
Use the include directive to keep your content DRY! | ||
include::_include.adoc[] | ||
==== | ||
|
||
include::_attributes.adoc[] |
Oops, something went wrong.