Skip to content

Commit

Permalink
Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
Browse files Browse the repository at this point in the history
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 spring-projectsgh-24481
  • Loading branch information
wilkinsona authored Feb 7, 2020
1 parent c640d28 commit 02e90a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 45 deletions.
11 changes: 10 additions & 1 deletion gradle/docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ configurations {
}

dependencies {
asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions:0.2.0.RELEASE")
asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.4.0.RELEASE")
}

repositories {
maven {
url "https://repo.spring.io/release"
mavenContent {
group "io.spring.asciidoctor"
}
}
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/docs/asciidoc/docinfo-footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>
<script type="text/javascript" src="js/toc.js"></script>
<script type="text/javascript" src="js/switch-language.js"></script>
43 changes: 0 additions & 43 deletions src/docs/asciidoc/js/switch-language.js

This file was deleted.

0 comments on commit 02e90a8

Please sign in to comment.