-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow templates directory to be specified for Maven Site plugin #179
Comments
I propose the following two locations:
I'm open to other ideas. |
Is there a standard config directory for maven projects? On Friday, November 27, 2015, Dan Allen notifications@github.com wrote:
Sent from Gmail Mobile |
I would propose to store Asciidoc templates in the following directories:
IMHO the "underscore" symbol looks extraneously for maven world, typical maven projects and typical directories layouts used by developers.
|
src/main/asciidoc makes more sense for templates or extensions. On Saturday, November 28, 2015, Alexander notifications@github.com wrote:
Sent from Gmail Mobile |
You are correct, that is our current default. I would like to establish a new convention (like the Gradle plugin has done) of src/docs/asciidoc, but that's a separate discussion.
True. I had suggested it because the plugin will ignore directories that start with an underscore, but the templates directory shouldn't have any AsciiDoc files in it, so I guess the underscore isn't necessary anyway. |
I don't know which is more correct, |
@mstanleyjones That's correct, the convention for Maven Sites is |
Let's just use:
I suppose we could do something more fancy like:
to align with the Maven Site skins, but that just feels excessive. On a side note, the Maven Site plugin has a configuration block (as do all plugins). There has to be a way to look this up from the Parser class. Does anyone know of a resource that explains how to use DI in the plexus container? |
…or#168 & asciidoctor#160 enable configuratino for site parser - rewrite Maven Site parser to make more organized and extensible - pass AsciiDoc configuration in Maven Site plugin to Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis - remove unused legacy site module
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite Maven Site parser to make more organized and extensible - pass AsciiDoc configuration in Maven Site plugin to Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis - remove unused legacy site module
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI - remove unused legacy site module - fix license headers - minor cleanups
Since I figured out how to read the site plugin's configuration and pass that information to Asciidoctor, I've decided to abandon the original idea (for now) and require the path to be specified using the <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version> <!-- 3.4 works here too -->
<configuration>
<asciidoc>
<templateDir>src/site/asciidoc/templates</templateDir>
</asciidoc>
</configuration>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.3</version>
</dependency>
</dependencies>
</plugin> If the path specified in the |
I think what I might do is just defer this issue to 1.5.4 since it is still a good idea...it just isn't a blocker anymore. |
The more I think about it, the more it just feels like too much magic. I think it's worth being explicit, now that we can do it. |
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI and Appveyor - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI and Appveyor - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI and Appveyor - remove unused legacy site module - fix license headers - minor cleanups
Allow the templates directory to be specified in the configuration of the Maven Site plugin.
ORIGINAL DESCRIPTION: Select a standard directory where Asciidoctor templates are stored and enable the templates option when calling the convert method if this directory exists and contains files. This avoids the need to have to define the templates directory explicitly and allows templates to be used with the Maven Site plugin.
The text was updated successfully, but these errors were encountered: