This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-website.git


The following commit(s) were added to refs/heads/main by this push:
     new c58db27a7 fixup test for Artemis out-of-date doc warning
c58db27a7 is described below

commit c58db27a7b12017482cb079cfd67fb66086d7b47
Author: Justin Bertram <[email protected]>
AuthorDate: Tue May 20 11:58:14 2025 -0500

    fixup test for Artemis out-of-date doc warning
---
 .../artemis/documentation/2.40.0/address-model.html       | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/components/artemis/documentation/2.40.0/address-model.html 
b/src/components/artemis/documentation/2.40.0/address-model.html
index cb8d007af..be1df872b 100644
--- a/src/components/artemis/documentation/2.40.0/address-model.html
+++ b/src/components/artemis/documentation/2.40.0/address-model.html
@@ -12,24 +12,19 @@
 <link rel="stylesheet" href="css/rouge-github.css">
 <script>
 document.addEventListener("DOMContentLoaded", function() {
-    var currentUrl = window.location.href;
-    console.log(currentUrl);
-    if (!currentUrl.includes("latest")) {
-        console.log("=== latest!");
+    const pathSegments = window.location.pathname.split('/');
+    if (window.location.hostname == "activemq.apache.org" && 
pathSegments[pathSegments.length - 2] != "latest") {
         var message = document.createElement("div");
         message.style.margin = "20px";
         message.style.textAlign = "center";
         message.style.backgroundColor = "#FFFFE0";
-        message.textContent = "Please be aware that this documentation is 
out-of-date. ";
+        message.textContent = "Please be aware that this documentation is out 
of date. ";
 
-        // Create a link
         var link = document.createElement("a");
-        link.href = "../latest/" + 
currentUrl.substring(currentUrl.lastIndexOf('/') + 1);
-        link.textContent = "Consider using the latest documentation.";
-
+        link.href = "../latest";
+        link.textContent = "Here is the latest documentation.";
         message.appendChild(link);
 
-        // Insert the message at the top of the body
         document.body.insertBefore(message, document.body.firstChild);
     }
 });


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to