diff --git a/.gitignore b/.gitignore index 338b74438..12bf2ac4e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ build/ bin/ .jfrog/ +node_modules/ + .gradle .idea/ *.iml diff --git a/README.adoc b/README.adoc index cecaad742..2f5fd7d0c 100644 --- a/README.adoc +++ b/README.adoc @@ -97,5 +97,17 @@ Building and running tests: ./mvnw install ``` +== Building the Documentation + +The documentation is built using Antora and can be run using the Antora Maven plugin. + +``` +./mvnw antora -pl spring-shell-docs +``` + +After running the command, you can view the site for this branch in `spring-shell-docs/target/site`. + + + == License Spring Shell is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license]. diff --git a/spring-shell-docs/antora-playbook.yml b/spring-shell-docs/antora-playbook.yml new file mode 100644 index 000000000..f62035551 --- /dev/null +++ b/spring-shell-docs/antora-playbook.yml @@ -0,0 +1,40 @@ +antora: + extensions: + - require: '@springio/antora-extensions' + root_component_name: 'shell' + - require: '@springio/antora-extensions/asciinema-extension' +site: + title: Spring Shell + url: https://docs.spring.io/spring-shell/reference + robots: allow +git: + ensure_git_suffix: false +content: + sources: + - url: .. + # Refname matching: + # https://docs.antora.org/antora/latest/playbook/content-refname-matching/ + branches: [ main,'({3..9}).+({0..9}).x', '!(3.0.x)', '!(3.1.x)' ] + tags: [ 'v({3..9}).+({0..9}).+({0..19})?(-{RC,M}+({0..9}))', '!(v3.0.+({0..9})?(-{RC,M}+({0..9})))', '!(v3.1.0-{RC,M}+({0..9}))', '!(v3.1.({0..19}))' ] + start_path: spring-shell-docs +asciidoc: + attributes: + page-stackoverflow-url: https://stackoverflow.com/tags/spring-shell + page-pagination: '' + hide-uri-scheme: '@' + tabs-sync-option: '@' + extensions: + - '@asciidoctor/tabs' + - '@springio/asciidoctor-extensions' + - '@springio/asciidoctor-extensions/javadoc-extension' +urls: + latest_version_segment_strategy: redirect:to + latest_version_segment: '' + redirect_facility: httpd +ui: + bundle: + url: https://github.com/spring-io/antora-ui-spring/releases/download/latest/ui-bundle.zip + snapshot: true +runtime: + log: + failure_level: warn diff --git a/spring-shell-docs/antora.yml b/spring-shell-docs/antora.yml index ad85cf9d5..cb6d708ef 100644 --- a/spring-shell-docs/antora.yml +++ b/spring-shell-docs/antora.yml @@ -1,5 +1,12 @@ name: shell -version: 4.0.0-SNAPSHOT +version: true title: Spring Shell nav: - modules/ROOT/nav.adoc +ext: + collector: + run: + command: mvnw process-resources -pl spring-shell-docs + local: true + scan: + dir: ./target/classes/antora-resources diff --git a/spring-shell-docs/package.json b/spring-shell-docs/package.json new file mode 100644 index 000000000..778edda0f --- /dev/null +++ b/spring-shell-docs/package.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "antora": "3.2.0-alpha.9", + "@antora/atlas-extension": "1.0.0-alpha.5", + "@antora/collector-extension": "1.0.2", + "@asciidoctor/tabs": "1.0.0-beta.6", + "@springio/antora-extensions": "1.14.7", + "@springio/asciidoctor-extensions": "1.0.0-alpha.17" + } +} diff --git a/spring-shell-docs/pom.xml b/spring-shell-docs/pom.xml index 7024c9d4f..6064de0e7 100644 --- a/spring-shell-docs/pom.xml +++ b/spring-shell-docs/pom.xml @@ -45,33 +45,30 @@ - - - src/main/antora - true - - antora-playbook.yml - - - org.antora antora-maven-plugin - ${antora-maven-plugin.version} + 1.0.0-alpha.5 true - ${nodejs.version} - target/classes/antora-playbook.yml + + HEAD + ${project.version} + - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - - true - + io.spring.maven.antora + antora-component-version-maven-plugin + 0.0.4 + + + + antora-component-version + + + diff --git a/spring-shell-docs/src/main/antora/antora-playbook.yml b/spring-shell-docs/src/main/antora/antora-playbook.yml deleted file mode 100644 index db914a373..000000000 --- a/spring-shell-docs/src/main/antora/antora-playbook.yml +++ /dev/null @@ -1,27 +0,0 @@ -site: - title: Spring Shell - url: https://docs.spring.io/spring-shell/reference/ -content: - sources: - - url: ${project.basedir}/.. - start_path: spring-shell-docs - worktrees: true -asciidoc: - attributes: - page-stackoverflow-url: https://stackoverflow.com/tags/spring-shell - page-pagination: '' - hide-uri-scheme: '@' - tabs-sync-option: '@' - chomp: 'all' - attribute-missing: 'warn' - snippets: example$docs-src/test/java/org/springframework/shell/docs - project-version: ${project.parent.version} - sourcemap: true -runtime: - log: - failure_level: warn - format: pretty -ui: - bundle: - url: https://github.com/spring-io/antora-ui-spring/releases/download/latest/ui-bundle.zip - snapshot: true diff --git a/spring-shell-docs/src/main/antora/resources/antora-resources/antora.yml b/spring-shell-docs/src/main/antora/resources/antora-resources/antora.yml new file mode 100644 index 000000000..114e6e9bb --- /dev/null +++ b/spring-shell-docs/src/main/antora/resources/antora-resources/antora.yml @@ -0,0 +1,14 @@ +version: ${antora-component.version} +prerelease: ${antora-component.prerelease} + +asciidoc: + attributes: + page-stackoverflow-url: https://stackoverflow.com/tags/spring-shell + page-pagination: '' + hide-uri-scheme: '@' + tabs-sync-option: '@' + chomp: 'all' + attribute-missing: 'warn' + snippets: example$docs-src/test/java/org/springframework/shell/docs + project-version: ${project.parent.version} + sourcemap: true