From 6ed0a220cb5a895583c918e9a9616d5c7cc2a4c7 Mon Sep 17 00:00:00 2001 From: Joe Grandja <10884212+jgrandja@users.noreply.github.com> Date: Sat, 14 Sep 2024 06:59:21 -0400 Subject: [PATCH] Use springio/antora-extensions --- .gitignore | 2 ++ docs/antora-playbook.yml | 38 ++++++++++++++++++++ docs/package.json | 10 ++++++ docs/spring-authorization-server-docs.gradle | 11 +++--- 4 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 docs/antora-playbook.yml create mode 100644 docs/package.json diff --git a/.gitignore b/.gitignore index a452c6129..a1a573000 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ out/ ### Mac ### .DS_Store cached-antora-playbook.yml + +node_modules diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml new file mode 100644 index 000000000..80800d644 --- /dev/null +++ b/docs/antora-playbook.yml @@ -0,0 +1,38 @@ +antora: + extensions: + - require: '@springio/antora-extensions' + root_component_name: 'authorization-server' +site: + title: Spring Authorization Server + url: https://docs.spring.io/spring-authorization-server/reference + robots: allow +git: + ensure_git_suffix: false +content: + sources: + - url: https://github.com/spring-projects/spring-authorization-server + branches: [main,'{1..9}.+({0..9}).x','!(1.{0..1}.x)'] + tags: ['{1..9}.+({0..9}).+({0..9})?(-{RC,M}*)','!(1.{0..1}.+({0..9})?(-{RC,M}*))'] + start_path: docs +asciidoc: + attributes: + page-stackoverflow-url: https://stackoverflow.com/tags/spring-authorization-server + page-related-doc-categories: security + page-related-doc-projects: framework + page-pagination: '' + hide-uri-scheme: '@' + tabs-sync-option: '@' + extensions: + - '@asciidoctor/tabs' + - '@springio/asciidoctor-extensions' +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/v0.4.16/ui-bundle.zip + snapshot: true +runtime: + log: + failure_level: warn diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..1b6f7bbf5 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "antora": "3.2.0-alpha.6", + "@antora/atlas-extension": "1.0.0-alpha.2", + "@antora/collector-extension": "1.0.0-beta.2", + "@asciidoctor/tabs": "1.0.0-beta.6", + "@springio/antora-extensions": "1.14.2", + "@springio/asciidoctor-extensions": "1.0.0-alpha.13" + } +} diff --git a/docs/spring-authorization-server-docs.gradle b/docs/spring-authorization-server-docs.gradle index 017e99685..be76a1035 100644 --- a/docs/spring-authorization-server-docs.gradle +++ b/docs/spring-authorization-server-docs.gradle @@ -10,14 +10,11 @@ version = project.rootProject.version sourceCompatibility = "17" antora { - playbook = "cached-antora-playbook.yml" - playbookProvider { - repository = "spring-projects/spring-authorization-server" - branch = "docs-build" - path = "lib/antora/templates/per-branch-antora-playbook.yml" - checkLocalBranch = true - } options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true] + environment = [ + 'BUILD_REFNAME': 'HEAD', + 'BUILD_VERSION': project.version, + ] } tasks.named("generateAntoraYml") {