Skip to content

Commit b082e5d

Browse files
committed
Add external link indicators to API docs in Antora
Closes gh-40817
1 parent 6f25951 commit b082e5d

File tree

8 files changed

+30
-37
lines changed

8 files changed

+30
-37
lines changed

antora/package-lock.json

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

antora/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@antora/cli": "3.2.0-alpha.4",
77
"@antora/site-generator": "3.2.0-alpha.4",
88
"@antora/atlas-extension": "1.0.0-alpha.2",
9-
"@springio/antora-extensions": "1.8.2",
9+
"@springio/antora-extensions": "1.11.0",
1010
"@springio/antora-xref-extension": "1.0.0-alpha.3",
1111
"@springio/antora-zip-contents-collector-extension": "1.0.0-alpha.8",
1212
"@asciidoctor/tabs": "1.0.0-beta.6",

buildSrc/src/main/java/org/springframework/boot/build/antora/Extensions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public final class Extensions {
4040
static {
4141
List<Extension> extensions = new ArrayList<>();
4242
extensions.add(new Extension("@springio/antora-extensions", ROOT_COMPONENT_EXTENSION,
43-
"@springio/antora-extensions/static-page-extension"));
43+
"@springio/antora-extensions/static-page-extension",
44+
"@springio/antora-extensions/override-navigation-builder-extension"));
4445
extensions.add(new Extension("@springio/antora-xref-extension"));
4546
extensions.add(new Extension("@springio/antora-zip-contents-collector-extension"));
4647
antora = List.copyOf(extensions);

buildSrc/src/test/resources/org/springframework/boot/build/antora/expected-playbook.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
antora:
22
extensions:
3+
- require: '@springio/antora-extensions/override-navigation-builder-extension'
34
- require: '@springio/antora-extensions/static-page-extension'
45
- require: '@springio/antora-xref-extension'
56
stub:

spring-boot-project/spring-boot-docs/src/docs/antora/antora.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,3 @@ ext:
99
classifier: catalog-content
1010
module: api
1111
destination: content-catalog
12-
nav-attributes:
13-
- path: "Overview"
14-
attributes: { icon: home }
15-
- path: "Documentation"
16-
attributes: { icon: book }
17-
- path: "Community"
18-
attributes: { icon: question }
19-
- path: "System Requirements"
20-
attributes: { icon: server }
21-
- path: "Installing Spring Boot"
22-
attributes: { icon: gift }
23-
- path: "Upgrading Spring Boot"
24-
attributes: { icon: rocket }
25-
- path: [ "Java APIs", "Spring Boot" ]
26-
attributes: { external: true }
27-
- path: [ "Java APIs", "Maven Plugin" ]
28-
attributes: { external: true}
29-
- path: [ "Java APIs", "Gradle Plugin" ]
30-
attributes: { external: true }
31-
- path: [ "Kotlin APIs", "Spring Boot" ]
32-
attributes: { external: true }
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
* xref:index.adoc[]
2-
* xref:documentation.adoc[]
3-
* xref:community.adoc[]
4-
* xref:system-requirements.adoc[]
5-
* xref:installing.adoc[]
6-
* xref:upgrading.adoc[]
1+
* xref:index.adoc[,role=navtree-icon-home]
2+
* xref:documentation.adoc[,role=navtree-icon-book]
3+
* xref:community.adoc[,role=navtree-icon-question]
4+
* xref:system-requirements.adoc[,role=navtree-icon-server]
5+
* xref:installing.adoc[,role=navtree-icon-gift]
6+
* xref:upgrading.adoc[,role=navtree-icon-rocket]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
* Java APIs
2-
** xref:api:java/index.html[Spring Boot]
3-
** xref:gradle-plugin:api/java/index.html[Gradle Plugin]
4-
** xref:maven-plugin:api/java/index.html[Maven Plugin]
2+
** xref:api:java/index.html[Spring Boot,role=link-external, window=_blank]
3+
** xref:gradle-plugin:api/java/index.html[Gradle Plugin,role=link-external, window=_blank]
4+
** xref:maven-plugin:api/java/index.html[Maven Plugin,role=link-external, window=_blank]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
* Kotlin APIs
2-
** xref:api:kotlin/index.html[Spring Boot]
2+
** xref:api:kotlin/index.html[Spring Boot,role=link-external, window=_blank]

0 commit comments

Comments
 (0)