From c8342fcfae9babb2be56f10942801edfbf9df573 Mon Sep 17 00:00:00 2001
From: Rob Winch <rwinch@users.noreply.github.com>
Date: Fri, 19 Apr 2024 14:15:49 -0500
Subject: [PATCH] Use antora-extensions 1.10.0

---
 .gitignore                       |  2 ++
 docs/antora-playbook.yml         | 37 ++++++++++++++++++++++++++++++++
 docs/package.json                | 10 +++++++++
 docs/spring-security-docs.gradle | 11 ++++------
 4 files changed, 53 insertions(+), 7 deletions(-)
 create mode 100644 docs/antora-playbook.yml
 create mode 100644 docs/package.json

diff --git a/.gitignore b/.gitignore
index ffd19a43acd..07ace14a1cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,5 @@ s101plugin.state
 
 !.idea/checkstyle-idea.xml
 !.idea/externalDependencies.xml
+
+node_modules
diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml
new file mode 100644
index 00000000000..621a1e3a980
--- /dev/null
+++ b/docs/antora-playbook.yml
@@ -0,0 +1,37 @@
+antora:
+  extensions:
+    - require: '@springio/antora-extensions'
+      root_component_name: 'security'
+site:
+  title: Spring Security
+  url: https://docs.spring.io/spring-security/reference
+  robots: allow
+git:
+  ensure_git_suffix: false
+content:
+  sources:
+    - url: https://github.com/spring-projects/spring-security
+      branches: [main, '5.{{6..9},{1..9}+({0..9})}.x', '6.+({0..9}).x']
+      tags: ['5.{{6..9},{1..9}+({0..9})}.{0..99}?(-RC+({0..9}))', '6.+({0..9}).+({0..9})?(-{RC,M}*)','!(5.6.{0..10}*)', '!(5.7.{0..8}*)', '!(5.8.{0..3}?({-RC,-M}+({0..9})))','!(6.0.{0..3}*)','!(6.1.0*)']
+      start_path: docs
+asciidoc:
+  attributes:
+    page-stackoverflow-url: https://stackoverflow.com/tags/spring-security
+    page-related-doc-categories: security
+    page-related-doc-projects: framework,graphql
+    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.11/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 00000000000..c82c8c22f6e
--- /dev/null
+++ b/docs/package.json
@@ -0,0 +1,10 @@
+{
+  "dependencies": {
+    "antora": "3.2.0-alpha.4",
+    "@antora/atlas-extension": "1.0.0-alpha.2",
+    "@antora/collector-extension": "1.0.0-alpha.3",
+    "@asciidoctor/tabs": "1.0.0-beta.6",
+    "@springio/antora-extensions": "1.10.0",
+    "@springio/asciidoctor-extensions": "1.0.0-alpha.10"
+  }
+}
diff --git a/docs/spring-security-docs.gradle b/docs/spring-security-docs.gradle
index 792fd817e91..aae5bf98f6d 100644
--- a/docs/spring-security-docs.gradle
+++ b/docs/spring-security-docs.gradle
@@ -7,14 +7,11 @@ apply plugin: 'io.spring.convention.docs'
 apply plugin: 'java'
 
 antora {
-	playbook = 'cached-antora-playbook.yml'
-	playbookProvider {
-		repository = 'spring-projects/spring-security'
-		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") {