Skip to content

Commit

Permalink
closes asciidoctor#437: removes unused title option from mojo + updat…
Browse files Browse the repository at this point in the history
…es README
  • Loading branch information
abelsromero committed Jun 16, 2020
1 parent 6607997 commit cbfa719
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 50 deletions.
50 changes: 11 additions & 39 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ As this is a typical Maven plugin, simply declare the plugin in the `<plugins>`
</executions>
</plugin>
----
<1> This is simply an unique id for the execution
<2> The asciidoctor-maven-plugin does not run in any phase by default, so one must be specified
<3> The (only for the moment) Asciidoctor Maven plugin goal
<1> This is simply an unique id for the execution.
<2> The asciidoctor-maven-plugin does not run in any phase by default, so one must be specified.
<3> The (only for the moment) Asciidoctor Maven plugin goal.

=== Configuration

Expand Down Expand Up @@ -196,11 +196,15 @@ templateCache:: enables the built-in cache used by the template converter when r
Only relevant if the `:template_dirs` option is specified, defaults to `true`.
sourcemap:: adds file and line number information to each parsed block (`lineno` and `source_location` attributes), defaults to `false`
catalogAssets:: tells the parser to capture images and links in the reference table available via the `references` property on the document AST object (experimental), defaults to `false`
attributes:: a `Map<String,Object>` of Asciidoctor attributes to pass for conversion, defaults to `null`
attributes:: a `Map<String,Object>` of Asciidoctor attributes to pass for conversion, defaults to `null`.
Refer to the http://asciidoctor.org/docs/user-manual/#attribute-catalog[catalog of document attributes] in the Asciidoctor user manual for a complete list.
+
[source,xml]
.example
----
<attributes>
<toc>left</toc>
<icons>font</icons>
<imagesdir>images</imagesdir>
<source-highlighter>coderay</source-highlighter>
</attributes>
Expand Down Expand Up @@ -258,7 +262,7 @@ Redirects all Asciidoctor messages to Maven's console logger as INFO during conv
* `failIf`: build fail conditions, disabled by default.
Allows setting one or many conditions that when met, abort the Maven build with `BUILD FAILURE` status.
+
[NOTE]
[WARNING]
====
Note that the plugin matches that all conditions are met together.
Unless you are controlling a very specific case, setting one condition should be enough. +
Expand All @@ -285,7 +289,7 @@ For example, set `include` to fail on any issue related to included files regard
</failIf>
</logHandler>
----
<1> Do not show messages as INFO in Maven output
<1> Do not show messages as INFO in Maven output.
<2> Build will fail on any message of severity `DEBUG` or higher, that includes all.
All matching messages will appear as ERROR in Maven output.

Expand All @@ -295,38 +299,6 @@ Since version 1.5.8 of AsciidoctorJ set `enableVerbose` to `true` option to vali
See https://github.com/asciidoctor/asciidoctor/issues/2722[#2722] if your are interested in the details.
====

==== Built-in attributes

There are various attributes Asciidoctor recognizes.
Below is a list of them and what they do.

title:: An override for the title of the document.

NOTE: This attribute, for backwards compatibility, can still be used in the top level configuration options.

Many other attributes are possible.
Refer to the http://asciidoctor.org/docs/user-manual/#attribute-catalog[catalog of document attributes] in the Asciidoctor user manual for a complete list.

More will be added in the future to take advantage of other options and attributes of Asciidoctor.
Any setting in the attributes section that conflicts with an explicitly named attribute configuration will be overidden by the explicitly named attribute configuration.
These settings can all be changed in the `<configuration>` section of the plugin section:

[source,xml]
.Plugin configuration options
----
<plugin>
<configuration>
<sourceDirectory>src/docs/asciidoc</sourceDirectory>
<outputDirectory>target/docs/asciidoc</outputDirectory>
<backend>html</backend>
<doctype>book</doctype>
<attributes>
<stylesheet>my-theme.css</stylesheet>
</attributes>
</configuration>
</plugin>
----

==== Passing POM properties

It is possible to pass properties defined in the POM to the Asciidoctor processor.
Expand Down Expand Up @@ -587,7 +559,7 @@ In addition to those attributes found in this section, any maven property is als
<my-site.version>2.3.0</my-site.version> <.>
</properties>
----
<.> Will be passed as `my-site-version` to the converter
<.> Will be passed as `my-site-version` to the converter.

logHandler::
Sames as the plugin's `requires`. +
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/org/asciidoctor/maven/AsciidoctorMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ public class AsciidoctorMojo extends AbstractMojo {
@Parameter(property = AsciidoctorMaven.PREFIX + "templateCache")
protected boolean templateCache = true;

@Parameter(property = AsciidoctorMaven.PREFIX + Attributes.TITLE, required = false)
protected String title = "";

@Parameter(property = AsciidoctorMaven.PREFIX + "sourceDocumentName", required = false)
protected String sourceDocumentName;

Expand Down Expand Up @@ -631,14 +628,6 @@ public void setTemplateEngine(String templateEngine) {
this.templateEngine = templateEngine;
}

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

public List<String> getSourceDocumentExtensions() {
return sourceDocumentExtensions;
}
Expand Down

0 comments on commit cbfa719

Please sign in to comment.