Skip to content

Commit 02e90a8

Browse files
authored
Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
0.4.0 provides built-in support for remembering a user's selections using local storage. This replaces the custom switch language JavaScript. The selection is stored using a key derived from the options that were available. Concretely, when the options are Java or Kotlin, the local storage key is java-kotlin. Similarly, if the choices were Java, Kotlin, and XML, the key would be java-kotlin-xml. Given local storage's domain and protocol scoping, the nature of the key that's used for storage will allow a user's selections to be applied across all documentation hosted on https://docs.spring.io that offer the same options. Closes gh-24481
1 parent c640d28 commit 02e90a8

File tree

3 files changed

+10
-45
lines changed

3 files changed

+10
-45
lines changed

gradle/docs.gradle

+10-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ configurations {
33
}
44

55
dependencies {
6-
asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions:0.2.0.RELEASE")
6+
asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.4.0.RELEASE")
7+
}
8+
9+
repositories {
10+
maven {
11+
url "https://repo.spring.io/release"
12+
mavenContent {
13+
group "io.spring.asciidoctor"
14+
}
15+
}
716
}
817

918
/**

src/docs/asciidoc/docinfo-footer.html

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>
22
<script type="text/javascript" src="js/toc.js"></script>
3-
<script type="text/javascript" src="js/switch-language.js"></script>

src/docs/asciidoc/js/switch-language.js

-43
This file was deleted.

0 commit comments

Comments
 (0)