This is an automated email from the ASF dual-hosted git repository. bmarwell pushed a commit to branch jbake in repository https://gitbox.apache.org/repos/asf/shiro-site.git
commit aea1302c8397fa4731c28583ddd1b29fa566be7f Author: Benjamin Marwell <[email protected]> AuthorDate: Sun Sep 12 21:43:10 2021 +0200 [Freemarker] User import instead of include. --- jbake/content/10-minute-tutorial.adoc | 6 +++--- jbake/content/documentation.adoc | 10 +++++----- jbake/content/download.adoc | 4 ++-- jbake/content/guice.adoc | 4 ++-- jbake/content/jaxrs.adoc | 2 +- jbake/content/release-archive.adoc | 2 +- jbake/content/spring-boot.adoc | 4 ++-- jbake/content/spring-framework.adoc | 4 ++-- jbake/content/web.adoc | 2 +- jbake/templates/download.ftl | 10 +++++----- jbake/templates/header.ftl | 6 +++--- jbake/templates/macros/artifacttable.ftl | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/jbake/content/10-minute-tutorial.adoc b/jbake/content/10-minute-tutorial.adoc index d565fd2..05c5be8 100644 --- a/jbake/content/10-minute-tutorial.adoc +++ b/jbake/content/10-minute-tutorial.adoc @@ -43,18 +43,18 @@ Shiro can be run in any environment, from the simplest command line application 1. Ensure you have JDK 1.8+ and Maven 3.0.3+ installed. 2. Download the lastest "Source Code Distribution" from the link:download.html[Download] page. -In this example, we're using the ${latestRelease} release distribution. +In this example, we're using the ${versions.latestRelease} release distribution. 3. Unzip the source package: + [source,bash] ---- -$ unzip shiro-root-${latestRelease}-source-release.zip +$ unzip shiro-root-${versions.latestRelease}-source-release.zip ---- 4. Enter the quickstart directory: + [source,bash] ---- -$ cd shiro-root-${latestRelease}/samples/quickstart +$ cd shiro-root-${versions.latestRelease}/samples/quickstart ---- 5. Run the QuickStart: + diff --git a/jbake/content/documentation.adoc b/jbake/content/documentation.adoc index 9c80877..9639ef7 100644 --- a/jbake/content/documentation.adoc +++ b/jbake/content/documentation.adoc @@ -30,12 +30,12 @@ Helpful if read in order: === Current Release -Apache Shiro ${latestRelease} (link:download.html[Download]) +Apache Shiro ${versions.latestRelease} (link:download.html[Download]) -* link:static/${latestRelease}/apidocs[API] (JavaDoc) -* link:static/${latestRelease}/xref/[Browse Source] (XREF) -* link:static/${latestRelease}/[Maven Static Site] +* link:static/${versions.latestRelease}/apidocs[API] (JavaDoc) +* link:static/${versions.latestRelease}/xref/[Browse Source] (XREF) +* link:static/${versions.latestRelease}/[Maven Static Site] ++++ -<@lendahand /> +<@lendahand.lendahand /> ++++ diff --git a/jbake/content/download.adoc b/jbake/content/download.adoc index 5db5b5d..2cb7a30 100644 --- a/jbake/content/download.adoc +++ b/jbake/content/download.adoc @@ -6,7 +6,7 @@ :idprefix: :icons: font -Apache Shiro ${latestRelease} is the current stable release (Java 1.8+ JVM). +Apache Shiro ${versions.latestRelease} is the current stable release (Java 1.8+ JVM). To download Shiro please follow the instructions below. @@ -16,5 +16,5 @@ You may link:https://infra.apache.org/release-signing.html#verifying-signature[v == Current Release -The current release is ${latestRelease}. +The current release is ${versions.latestRelease}. For older releases, please visit our link:release-archive.html[release archive]. diff --git a/jbake/content/guice.adoc b/jbake/content/guice.adoc index 2b6ee05..805de82 100644 --- a/jbake/content/guice.adoc +++ b/jbake/content/guice.adoc @@ -30,7 +30,7 @@ shiro-guice provides three Guice modules that can be included in your applicatio First, include the shiro-guice dependency in your project: ++++ -<@dependencies anchorId="cli" deps=[{'g':'org.apache.shiro', 'a':'shiro-guice', "v":"${latestRelease}"}] /> +<@dependencies.dependencies anchorId="cli" deps=[{'g':'org.apache.shiro', 'a':'shiro-guice', "v":"${versions.latestRelease}"}] /> ++++ The most simple configuration is to extend `ShiroModule` to install your own `Realm`. @@ -182,5 +182,5 @@ bindConstant().annotatedWith(Names.named("shiro.hashAlgorithmName")).to(Md5Hash. ---- ++++ -<@lendahand /> +<@lendahand.lendahand /> ++++ diff --git a/jbake/content/jaxrs.adoc b/jbake/content/jaxrs.adoc index b4ad0e4..9e6591f 100644 --- a/jbake/content/jaxrs.adoc +++ b/jbake/content/jaxrs.adoc @@ -12,7 +12,7 @@ Apache Shiro's JAX-RS support is built on top of the more general link:web.html[ Include the `shiro-servlet-plugin` and `shiro-jaxrs` dependencies in you application classpath (we recomend using a tool such as Apache Maven or Gradle to manage this). ++++ -<@dependencies anchorId="cli" deps=[{'g':'org.apache.shiro', 'a':'shiro-servlet-plugin', "v":"${latestRelease}"},{"g":'org.apache.shiro', "a":'shiro-jaxrs', "v":'${latestRelease}'}] /> +<@dependencies.dependencies anchorId="cli" deps=[{'g':'org.apache.shiro', 'a':'shiro-servlet-plugin', "v":"${versions.latestRelease}"},{"g":'org.apache.shiro', "a":'shiro-jaxrs', "v":'${versions.latestRelease}'}] /> ++++ diff --git a/jbake/content/release-archive.adoc b/jbake/content/release-archive.adoc index 4c7520e..6ac36c9 100644 --- a/jbake/content/release-archive.adoc +++ b/jbake/content/release-archive.adoc @@ -7,7 +7,7 @@ This is the Apache Shiro release archive. To download archived versions of Apache Shiro please follow the instructions below. -Please note that the current version of Apache Shiro is ${latestRelease}. +Please note that the current version of Apache Shiro is ${versions.latestRelease}. We recommend to stick to the latest version. == Code Signatures diff --git a/jbake/content/spring-boot.adoc b/jbake/content/spring-boot.adoc index 590fdb8..e10e88a 100644 --- a/jbake/content/spring-boot.adoc +++ b/jbake/content/spring-boot.adoc @@ -14,7 +14,7 @@ Shiro has first-class support for Spring web applications. In a web application, First include the Shiro Spring web starter dependency in you application classpath (we recomend using a tool such as Apache Maven or Gradle to manage this). ++++ -<@dependencies anchorId="web" deps=[{"g":"org.apache.shiro", "a":"shiro-spring-boot-web-starter", "v":"${latestRelease}"}] /> +<@dependencies.dependencies anchorId="web" deps=[{"g":"org.apache.shiro", "a":"shiro-spring-boot-web-starter", "v":"${versions.latestRelease}"}] /> ++++ Provide a Realm implementation: @@ -164,7 +164,7 @@ protected CacheManager cacheManager() { Include the Shiro Spring starter dependency in you application classpath (we recomend using a tool such as Apache Maven or Gradle to manage this). ++++ -<@dependencies anchorId="cli" deps=[{"g":"org.apache.shiro", "a":"shiro-spring-boot-starter", "v":"${latestRelease}"}] /> +<@dependencies.dependencies anchorId="cli" deps=[{"g":"org.apache.shiro", "a":"shiro-spring-boot-starter", "v":"${versions.latestRelease}"}] /> ++++ The only thing that is left is to configure a link:realm.html[realm]: diff --git a/jbake/content/spring-framework.adoc b/jbake/content/spring-framework.adoc index ea3001a..e39cf8c 100644 --- a/jbake/content/spring-framework.adoc +++ b/jbake/content/spring-framework.adoc @@ -12,7 +12,7 @@ This page covers the ways to integrate Shiro into link:http://spring.io[Spring]- Include the Shiro Spring dependency in you application classpath (we recomend using a tool such as Apache Maven or Gradle to manage this). ++++ -<@dependencies anchorId="cli" deps=[{'g':'org.apache.shiro', 'a':'shiro-spring', "v":"${latestRelease}"},{"g":'org.springframework', "a":'spring-context', "v":'${r"${spring.version}"}'}] /> +<@dependencies.dependencies anchorId="cli" deps=[{'g':'org.apache.shiro', 'a':'shiro-spring', "v":"${versions.latestRelease}"},{"g":'org.springframework', "a":'spring-context', "v":'${r"${spring.version}"}'}] /> ++++ Import the Shiro Spring configurations: @@ -83,7 +83,7 @@ Shiro has first-class support for Spring web applications. In a web application, Include the Shiro Spring web dependencies in you application classpath (we recomend using a tool such as Apache Maven or Gradle to manage this). ++++ -<@dependencies anchorId="web" deps=[{"g":'org.apache.shiro', "a":'shiro-spring', "v":"${latestRelease}"}, {"g":'org.apache.shiro', "a":'shiro-web', "v":"${latestRelease}"},{"g":'org.springframework', "a":'spring-webmvc', "v":'${r"${spring.version}"}'}] /> +<@dependencies.dependencies anchorId="web" deps=[{"g":'org.apache.shiro', "a":'shiro-spring', "v":"${versions.latestRelease}"}, {"g":'org.apache.shiro', "a":'shiro-web', "v":"${versions.latestRelease}"},{"g":'org.springframework', "a":'spring-webmvc', "v":'${r"${spring.version}"}'}] /> ++++ Import the Shiro Spring configurations: diff --git a/jbake/content/web.adoc b/jbake/content/web.adoc index 7c32590..7c9d10e 100644 --- a/jbake/content/web.adoc +++ b/jbake/content/web.adoc @@ -906,5 +906,5 @@ For example: The `lacksPermission` tag is the logical opposite of the <<Web-haspermissiontag,hasPermission>> tag. ++++ -<@lendahand /> +<@lendahand.lendahand /> ++++ diff --git a/jbake/templates/download.ftl b/jbake/templates/download.ftl index 1c6f1ae..fe612c3 100644 --- a/jbake/templates/download.ftl +++ b/jbake/templates/download.ftl @@ -2,7 +2,7 @@ <#include "menu.ftl"> -<#include "macros/artifacttable.ftl"> +<#import "macros/artifacttable.ftl" as artifacttable> <#if (content.title)??> <div class="page-header"> @@ -16,13 +16,13 @@ <#if ((content.releases).versions)??> <#assign displayReleases=((content.releases).versions)![] /> <#else> - <#assign displayReleases=oldReleases /> + <#assign displayReleases=versions.oldReleases /> </#if> <p> <ul> <#list displayReleases as version> - <#assign release=releases[version] /> + <#assign release=versions.releases[version] /> <li><a href="#${release.version?replace(".", "")}">Apache Shiro Release v${release.version}</a></li> <ul> <li><a href="#${release.version?replace(".", "")}Binary">${release.version} Binary Distribution</a></li> @@ -36,7 +36,7 @@ <#list displayReleases as version> - <#assign release=releases[version] /> + <#assign release=versions.releases[version] /> <h2>Release ${release.version}</h2> <h4><a id="#${release.version?replace(".", "")}Binary"></a>${release.version} Binary Distribution</h4> @@ -50,7 +50,7 @@ <p> </p> - <@artifactTable versionObject=release /> + <@artifacttable.artifactTable versionObject=release /> <h4><a id=""#${release.version?replace(".", "")}Source"></a>${release.version} Source Code Distribution</h4> diff --git a/jbake/templates/header.ftl b/jbake/templates/header.ftl index 1bee977..c267ed4 100644 --- a/jbake/templates/header.ftl +++ b/jbake/templates/header.ftl @@ -15,9 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. --> -<#include "macros/versions.ftl"> -<#include "macros/dependencies.ftl"> -<#include "macros/lend-a-hand.ftl"> +<#import "macros/versions.ftl" as versions> +<#import "macros/dependencies.ftl" as dependencies> +<#import "macros/lend-a-hand.ftl" as lendahand> <html lang="en"> <head> <meta charset="utf-8"/> diff --git a/jbake/templates/macros/artifacttable.ftl b/jbake/templates/macros/artifacttable.ftl index 339d77b..aba37d8 100644 --- a/jbake/templates/macros/artifacttable.ftl +++ b/jbake/templates/macros/artifacttable.ftl @@ -12,7 +12,7 @@ <tbody> <#list versionObject.artifacts as artifactName> <#-- releases.yaml contains the artifactObject's names. We can just resolve them using eval. --> - <#assign artifact=artifacts[artifactName]> + <#assign artifact=versions.artifacts[artifactName]> <tr> <#assign classifier=artifact.c!""> <#assign group=artifact.g?replace('.', '/') >
