From 846453e3daca81b763520b2434b85164c5262132 Mon Sep 17 00:00:00 2001 From: natalie-bernhard Date: Fri, 17 Nov 2023 11:09:47 -0600 Subject: [PATCH 1/3] Set node-sass version and fix feature toc jump --- scripts/build/antora_install.sh | 2 +- src/main/content/antora_ui/src/js/05-features.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build/antora_install.sh b/scripts/build/antora_install.sh index 0718f96df6..12881642b2 100755 --- a/scripts/build/antora_install.sh +++ b/scripts/build/antora_install.sh @@ -15,7 +15,7 @@ pushd src/main/content/antora_ui echo "Installing Antora dependencies" npm install -g @antora/site-generator@3.0.1 npm install gulp -g --ignore-scripts -npm install node-sass gulp-sass gulp-dart-sass --save-dev +npm install node-sass@7.0.3 gulp-sass gulp-dart-sass --save-dev npm install gulp sass:convert SOURCEMAPS=true gulp build diff --git a/src/main/content/antora_ui/src/js/05-features.js b/src/main/content/antora_ui/src/js/05-features.js index 76ae28124a..9d3d2c3076 100644 --- a/src/main/content/antora_ui/src/js/05-features.js +++ b/src/main/content/antora_ui/src/js/05-features.js @@ -91,8 +91,8 @@ function selectTOC() { if (featureToc.length > 0) { var li = featureToc.parent()[0]; var anchor = li.querySelector(".nav-link"); - navigation.activateCurrentPath(li); - navigation.scrollItemToMidpoint(anchor); + navigation.activateCurrentPath($(li)); + navigation.scrollItemToMidpoint($(anchor)); } } From 080afb349778198ecf5798f8cc4db3020dabeed7 Mon Sep 17 00:00:00 2001 From: natalie-bernhard Date: Tue, 17 Oct 2023 09:25:04 -0500 Subject: [PATCH 2/3] realign with draft --- docker/Dockerfile.prod | 15 --------------- docker/Dockerfile.staging | 15 --------------- scripts/build/docs_part_1.sh | 1 - src/main/content/_assets/js/builds.js | 8 ++++++++ 4 files changed, 8 insertions(+), 31 deletions(-) diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod index 2d1497927b..1402266a47 100644 --- a/docker/Dockerfile.prod +++ b/docker/Dockerfile.prod @@ -38,10 +38,6 @@ RUN $BUILD_SCRIPTS_DIR/docs_part_2.sh RUN $BUILD_SCRIPTS_DIR/gzip.sh -RUN mkdir /temp-docs -RUN mv /target/jekyll-webapp/docs /temp-docs -RUN ls /target/jekyll-webapp - # # # @@ -52,18 +48,7 @@ COPY .mvn /.mvn COPY pom.xml / COPY --from=docs --chown=1001:0 /src /src COPY --from=docs --chown=1001:0 /target /target -# Maven does not need to know about the large amount of files generated by Antora. The antora files only need to be -# correctly placed on the file system so that the openliberty.io application can serve the files to browsers. -# When the Antora files are placed in the /target directory, this forces Maven to deal with too many files. -# Maven will encouter a JVM crash because there are too many files related to docs. - -# Part 1: Remove the docs files so Maven does not need to deal with them. -RUN rm -rf /target/jekyll-webapp/docs -# Part 2: Build the Java application RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded -# Part 3: Restore the doc files that were previously removed -RUN mkdir target/openliberty-website-1.0-SNAPSHOT/docs -COPY --from=docs --chown=1001:0 /temp-docs/docs /target/openliberty-website-1.0-SNAPSHOT/docs # # diff --git a/docker/Dockerfile.staging b/docker/Dockerfile.staging index fd8f2168c0..b61a9d9b93 100644 --- a/docker/Dockerfile.staging +++ b/docker/Dockerfile.staging @@ -35,10 +35,6 @@ RUN $BUILD_SCRIPTS_DIR/docs_part_2.sh RUN $BUILD_SCRIPTS_DIR/gzip.sh -RUN mkdir /temp-docs -RUN mv /target/jekyll-webapp/docs /temp-docs -RUN ls /target/jekyll-webapp - # # # @@ -49,18 +45,7 @@ COPY .mvn /.mvn COPY pom.xml / COPY --from=docs --chown=1001:0 /src /src COPY --from=docs --chown=1001:0 /target /target -# Maven does not need to know about the large amount of files generated by Antora. The antora files only need to be -# correctly placed on the file system so that the openliberty.io application can serve the files to browsers. -# When the Antora files are placed in the /target directory, this forces Maven to deal with too many files. -# Maven will encouter a JVM crash because there are too many files related to docs. - -# Part 1: Remove the docs files so Maven does not need to deal with them. -RUN rm -rf /target/jekyll-webapp/docs -# Part 2: Build the Java application RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded -# Part 3: Restore the doc files that were previously removed -RUN mkdir target/openliberty-website-1.0-SNAPSHOT/docs -COPY --from=docs --chown=1001:0 /temp-docs/docs /target/openliberty-website-1.0-SNAPSHOT/docs # # diff --git a/scripts/build/docs_part_1.sh b/scripts/build/docs_part_1.sh index 4fe950a462..115f478aa2 100755 --- a/scripts/build/docs_part_1.sh +++ b/scripts/build/docs_part_1.sh @@ -36,7 +36,6 @@ echo "Moving the Antora docs to the jekyll webapp" timer_start=$(date +%s) mkdir -p target/jekyll-webapp/docs/ cp -r src/main/content/docs/build/site/. target/jekyll-webapp/ -rm -rf src/main/content/docs/build timer_end=$(date +%s) echo "Total execution time for copying Antora docs to webapp: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" diff --git a/src/main/content/_assets/js/builds.js b/src/main/content/_assets/js/builds.js index 1b53827dd9..dbe0ffd771 100644 --- a/src/main/content/_assets/js/builds.js +++ b/src/main/content/_assets/js/builds.js @@ -199,6 +199,14 @@ function render_builds(builds, parent) { // update maven and gradle commands to use latest version if (parent.parent().data('builds-id') == 'runtime_releases') { + var latest_version = latest_releases.runtime.version.trim(); + + // check that latest version matches x.x.x.x before updating + var re = /^\d+\.\d\.\d\.\d+/; + if (re.test(latest_version)) { + $('.latest_version').html(latest_version); + } + // get the newest release version // used to only add builds from the last two years to the runtime release table versArr = JSON.parse(JSON.stringify(builds)); From 19e633fa97c3113734b9e9ff711b1673eab0c0c2 Mon Sep 17 00:00:00 2001 From: natalie-bernhard Date: Mon, 20 Nov 2023 09:35:52 -0600 Subject: [PATCH 3/3] remove old changes --- docker/Dockerfile.prod | 15 +++++++++++++++ docker/Dockerfile.staging | 15 +++++++++++++++ scripts/build/docs_part_1.sh | 1 + src/main/content/_assets/js/builds.js | 8 -------- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod index 1402266a47..2d1497927b 100644 --- a/docker/Dockerfile.prod +++ b/docker/Dockerfile.prod @@ -38,6 +38,10 @@ RUN $BUILD_SCRIPTS_DIR/docs_part_2.sh RUN $BUILD_SCRIPTS_DIR/gzip.sh +RUN mkdir /temp-docs +RUN mv /target/jekyll-webapp/docs /temp-docs +RUN ls /target/jekyll-webapp + # # # @@ -48,7 +52,18 @@ COPY .mvn /.mvn COPY pom.xml / COPY --from=docs --chown=1001:0 /src /src COPY --from=docs --chown=1001:0 /target /target +# Maven does not need to know about the large amount of files generated by Antora. The antora files only need to be +# correctly placed on the file system so that the openliberty.io application can serve the files to browsers. +# When the Antora files are placed in the /target directory, this forces Maven to deal with too many files. +# Maven will encouter a JVM crash because there are too many files related to docs. + +# Part 1: Remove the docs files so Maven does not need to deal with them. +RUN rm -rf /target/jekyll-webapp/docs +# Part 2: Build the Java application RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded +# Part 3: Restore the doc files that were previously removed +RUN mkdir target/openliberty-website-1.0-SNAPSHOT/docs +COPY --from=docs --chown=1001:0 /temp-docs/docs /target/openliberty-website-1.0-SNAPSHOT/docs # # diff --git a/docker/Dockerfile.staging b/docker/Dockerfile.staging index b61a9d9b93..fd8f2168c0 100644 --- a/docker/Dockerfile.staging +++ b/docker/Dockerfile.staging @@ -35,6 +35,10 @@ RUN $BUILD_SCRIPTS_DIR/docs_part_2.sh RUN $BUILD_SCRIPTS_DIR/gzip.sh +RUN mkdir /temp-docs +RUN mv /target/jekyll-webapp/docs /temp-docs +RUN ls /target/jekyll-webapp + # # # @@ -45,7 +49,18 @@ COPY .mvn /.mvn COPY pom.xml / COPY --from=docs --chown=1001:0 /src /src COPY --from=docs --chown=1001:0 /target /target +# Maven does not need to know about the large amount of files generated by Antora. The antora files only need to be +# correctly placed on the file system so that the openliberty.io application can serve the files to browsers. +# When the Antora files are placed in the /target directory, this forces Maven to deal with too many files. +# Maven will encouter a JVM crash because there are too many files related to docs. + +# Part 1: Remove the docs files so Maven does not need to deal with them. +RUN rm -rf /target/jekyll-webapp/docs +# Part 2: Build the Java application RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded +# Part 3: Restore the doc files that were previously removed +RUN mkdir target/openliberty-website-1.0-SNAPSHOT/docs +COPY --from=docs --chown=1001:0 /temp-docs/docs /target/openliberty-website-1.0-SNAPSHOT/docs # # diff --git a/scripts/build/docs_part_1.sh b/scripts/build/docs_part_1.sh index 115f478aa2..4fe950a462 100755 --- a/scripts/build/docs_part_1.sh +++ b/scripts/build/docs_part_1.sh @@ -36,6 +36,7 @@ echo "Moving the Antora docs to the jekyll webapp" timer_start=$(date +%s) mkdir -p target/jekyll-webapp/docs/ cp -r src/main/content/docs/build/site/. target/jekyll-webapp/ +rm -rf src/main/content/docs/build timer_end=$(date +%s) echo "Total execution time for copying Antora docs to webapp: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" diff --git a/src/main/content/_assets/js/builds.js b/src/main/content/_assets/js/builds.js index dbe0ffd771..1b53827dd9 100644 --- a/src/main/content/_assets/js/builds.js +++ b/src/main/content/_assets/js/builds.js @@ -199,14 +199,6 @@ function render_builds(builds, parent) { // update maven and gradle commands to use latest version if (parent.parent().data('builds-id') == 'runtime_releases') { - var latest_version = latest_releases.runtime.version.trim(); - - // check that latest version matches x.x.x.x before updating - var re = /^\d+\.\d\.\d\.\d+/; - if (re.test(latest_version)) { - $('.latest_version').html(latest_version); - } - // get the newest release version // used to only add builds from the last two years to the runtime release table versArr = JSON.parse(JSON.stringify(builds));