From: Ben Soares Date: Mon, 9 May 2022 11:27:27 +0000 (+0100) Subject: JAL-4004 Temporary mechanism to add JalviewJS link for selected versions to hugo... X-Git-Tag: Release_2_11_2_6~64^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ff2fd741606ac49562f2cfb2b5b46059191feb35;p=jalview.git JAL-4004 Temporary mechanism to add JalviewJS link for selected versions to hugo website --- diff --git a/build.gradle b/build.gradle index 18af797..17aec88 100644 --- a/build.gradle +++ b/build.gradle @@ -2463,6 +2463,7 @@ task hugoTemplates { def releaseMdFile = file("${jalviewDir}/${releases_dir}/release-${JALVIEW_VERSION_UNDERSCORES}.md") def whatsnewMdFile = file("${jalviewDir}/${whatsnew_dir}/whatsnew-${JALVIEW_VERSION_UNDERSCORES}.md") def oldJvlFile = file("${jalviewDir}/${hugo_old_jvl}") + def jalviewjsFile = file("${jalviewDir}/${hugo_jalviewjs}") doFirst { // specific release template for version archive @@ -2486,6 +2487,7 @@ task hugoTemplates { } def oldJvl = oldJvlFile.exists() ? oldJvlFile.collect{it} : [] + def jalviewjsLink = jalviewjsFile.exists() ? jalviewjsFile.collect{it} : [] def changesHugo = null if (changes != null) { @@ -2549,6 +2551,7 @@ task hugoTemplates { CHANGES: changesHugo, DATE: givenDate == null ? "" : givenDate.format("yyyy-MM-dd"), DRAFT: givenDate == null ? "true" : "false", + JALVIEWJSLINK: jalviewjsLink.contains(JALVIEW_VERSION) ? "true" : "false", JVL_HEADER: oldJvl.contains(JALVIEW_VERSION) ? "jvl: true" : "" ] ) diff --git a/gradle.properties b/gradle.properties index cd4bc4a..acb65e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -59,6 +59,7 @@ shadow_jar_main_class = jalview.bin.Launcher jalview_name = Jalview hugo_old_jvl = utils/hugo/old_jvl.txt +hugo_jalviewjs = utils/hugo/jalviewjs.txt hugo_build_dir = build/website/hugo hugo_data_installers_dir = data/installers hugo_version_archive_dir = content/development/archive diff --git a/utils/hugo/jalviewjs.txt b/utils/hugo/jalviewjs.txt new file mode 100644 index 0000000..0637dcb --- /dev/null +++ b/utils/hugo/jalviewjs.txt @@ -0,0 +1,2 @@ +2.11.1.0 +2.11.2.0 diff --git a/utils/hugo/templates/content/development/archive/Version-__VERSION_UNDERSCORES__/_index.md b/utils/hugo/templates/content/development/archive/Version-__VERSION_UNDERSCORES__/_index.md index 2f4558e..dada8ee 100644 --- a/utils/hugo/templates/content/development/archive/Version-__VERSION_UNDERSCORES__/_index.md +++ b/utils/hugo/templates/content/development/archive/Version-__VERSION_UNDERSCORES__/_index.md @@ -9,7 +9,7 @@ cascade: draft: __DRAFT__ release_date: __DATE__ version: "__VERSION__" - jalviewjslink: false + jalviewjslink: __JALVIEWJSLINK__ __JVL_HEADER__ ---