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

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


The following commit(s) were added to refs/heads/main by this push:
     new 5da520e9 Add WARNING section when documentation is marked as 
deprecated (#1479)
5da520e9 is described below

commit 5da520e9de9f77972e04f5b509c3e07be9045298
Author: Ganesh Patil <[email protected]>
AuthorDate: Wed Feb 4 17:34:24 2026 +0530

    Add WARNING section when documentation is marked as deprecated (#1479)
    
    * Add WARNING section for deprecated documentation pages
    
    - Create Antora extension to promote 'deprecated', 'supportlevel', and 
'shortname'
      document attributes to page attributes (page-deprecated, 
page-supportlevel,
      page-shortname) so they are accessible in Handlebars templates
    - Update article.hbs template to display warning banner when 
page.attributes.deprecated
      is set, showing 'This {shortname} is deprecated' message
    - Register the extension in antora-playbook.yml
    
    * Revert failure_level back to warn
---
 antora-playbook-snippets/antora-playbook.yml       |   1 +
 .../{site-2c6491cbb6.css => site-e7a3c95ff3.css}   |   2 +-
 antora-ui-camel/public/_/data/rev-manifest.json    |   4 +-
 antora-ui-camel/public/_/helpers/asset.js          |   4 +-
 .../public/_/img/logo-camel-medium-372cf8688f.png  | Bin 16120 -> 0 bytes
 .../public/_/img/logo-camel-medium-ec76e19c58.png  | Bin 0 -> 16080 bytes
 antora-ui-camel/public/_/partials/article.hbs      |  16 ++++++++
 antora-ui-camel/public/_/partials/head-styles.hbs  |   2 +-
 antora-ui-camel/public/_/rev-manifest              |   4 +-
 antora-ui-camel/src/partials/article.hbs           |  16 ++++++++
 extensions/promote-deprecated-attribute.js         |  42 +++++++++++++++++++++
 11 files changed, 83 insertions(+), 8 deletions(-)

diff --git a/antora-playbook-snippets/antora-playbook.yml 
b/antora-playbook-snippets/antora-playbook.yml
index 99436d59..17ec0962 100644
--- a/antora-playbook-snippets/antora-playbook.yml
+++ b/antora-playbook-snippets/antora-playbook.yml
@@ -111,6 +111,7 @@ runtime:
 
 antora:
   extensions:
+    - ./extensions/promote-deprecated-attribute.js
     - require: '@djencks/antora-aggregate-collector'
 #      log_level: trace
       componentversions:
diff --git a/antora-ui-camel/public/_/css/site-2c6491cbb6.css 
b/antora-ui-camel/public/_/css/site-e7a3c95ff3.css
similarity index 99%
rename from antora-ui-camel/public/_/css/site-2c6491cbb6.css
rename to antora-ui-camel/public/_/css/site-e7a3c95ff3.css
index da64dda9..4dad1376 100644
--- a/antora-ui-camel/public/_/css/site-2c6491cbb6.css
+++ b/antora-ui-camel/public/_/css/site-e7a3c95ff3.css
@@ -1,3 +1,3 @@
-@font-face{font-family:Open 
Sans;font-style:normal;font-display:swap;font-weight:300;src:local("Open Sans 
Light"),local("OpenSans-Light"),url(../font/open-sans-latin-ext-300.woff2) 
format("woff2"),url(../font/open-sans-latin-ext-300.woff) 
format("woff")}@font-face{font-family:Open 
Sans;font-style:italic;font-display:swap;font-weight:300;src:local("Open Sans 
Light 
Italic"),local("OpenSans-LightItalic"),url(../font/open-sans-latin-ext-300-italic.woff2)
 format("woff2"),url(../font/open-sans [...]
+@font-face{font-family:Open 
Sans;font-style:normal;font-display:swap;font-weight:300;src:local("Open Sans 
Light"),local("OpenSans-Light"),url(../font/open-sans-latin-ext-300.woff2) 
format("woff2"),url(../font/open-sans-latin-ext-300.woff) 
format("woff")}@font-face{font-family:Open 
Sans;font-style:italic;font-display:swap;font-weight:300;src:local("Open Sans 
Light 
Italic"),local("OpenSans-LightItalic"),url(../font/open-sans-latin-ext-300-italic.woff2)
 format("woff2"),url(../font/open-sans [...]
 /*! Adapted from the GitHub style by Vasily Polovnyov <[email protected]> 
*/.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:500}.hljs-literal,.hljs-number,.hljs-tag
 
.hljs-attr,.hljs-template-variable,.hljs-variable{color:teal}.hljs-doctag,.hljs-string{color:#d14}.hljs-section,.hljs-selector-id,.hljs-title{color:#900;font-weight:500}.hljs-subst{font-weight:400}.hljs-class
 .hljs-title,.hljs-type{color:#458;font-wei [...]
 /*! Asciidoctor Tabs | Copyright (c) 2018-present Dan Allen | MIT License 
*/.tabs{margin-bottom:1.25em}.tablist>ul{-ms-flex-wrap:wrap;flex-wrap:wrap;list-style:none;margin:0;padding:0}.tablist>ul,.tablist>ul
 li{display:-webkit-box;display:-ms-flexbox;display:flex}.tablist>ul 
li{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;cursor:pointer;font-weight:700;line-height:1.5;padding:.25em
 1em;position:relative}.tablist>ul li:focus-visible{outline:none} [...]
\ No newline at end of file
diff --git a/antora-ui-camel/public/_/data/rev-manifest.json 
b/antora-ui-camel/public/_/data/rev-manifest.json
index 796239f3..6e921ac7 100644
--- a/antora-ui-camel/public/_/data/rev-manifest.json
+++ b/antora-ui-camel/public/_/data/rev-manifest.json
@@ -1,5 +1,5 @@
 {
-  "css/site.css": "css/site-2c6491cbb6.css",
+  "css/site.css": "css/site-e7a3c95ff3.css",
   "img/algolia.svg": "img/algolia-f4ab98e0de.svg",
   "img/apache-kafka.svg": "img/apache-kafka-88809b7472.svg",
   "img/apache-karaf.svg": "img/apache-karaf-7bdb5ce2e3.svg",
@@ -28,7 +28,7 @@
   "img/karavan.svg": "img/karavan-8621354711.svg",
   "img/knative.svg": "img/knative-5010ee4773.svg",
   "img/kubernetes.svg": "img/kubernetes-07ba46aaa2.svg",
-  "img/logo-camel-medium.png": "img/logo-camel-medium-372cf8688f.png",
+  "img/logo-camel-medium.png": "img/logo-camel-medium-ec76e19c58.png",
   "img/logo-d.svg": "img/logo-d-a567cee6fa.svg",
   "img/menu.svg": "img/menu-8775cec4be.svg",
   "img/quarkus.svg": "img/quarkus-446ffca541.svg",
diff --git a/antora-ui-camel/public/_/helpers/asset.js 
b/antora-ui-camel/public/_/helpers/asset.js
index 5981d340..01554ea7 100644
--- a/antora-ui-camel/public/_/helpers/asset.js
+++ b/antora-ui-camel/public/_/helpers/asset.js
@@ -1,7 +1,7 @@
 'use strict'
 
 const manifest = {
-  "css/site.css": "css/site-2c6491cbb6.css",
+  "css/site.css": "css/site-e7a3c95ff3.css",
   "img/algolia.svg": "img/algolia-f4ab98e0de.svg",
   "img/apache-kafka.svg": "img/apache-kafka-88809b7472.svg",
   "img/apache-karaf.svg": "img/apache-karaf-7bdb5ce2e3.svg",
@@ -30,7 +30,7 @@ const manifest = {
   "img/karavan.svg": "img/karavan-8621354711.svg",
   "img/knative.svg": "img/knative-5010ee4773.svg",
   "img/kubernetes.svg": "img/kubernetes-07ba46aaa2.svg",
-  "img/logo-camel-medium.png": "img/logo-camel-medium-372cf8688f.png",
+  "img/logo-camel-medium.png": "img/logo-camel-medium-ec76e19c58.png",
   "img/logo-d.svg": "img/logo-d-a567cee6fa.svg",
   "img/menu.svg": "img/menu-8775cec4be.svg",
   "img/quarkus.svg": "img/quarkus-446ffca541.svg",
diff --git a/antora-ui-camel/public/_/img/logo-camel-medium-372cf8688f.png 
b/antora-ui-camel/public/_/img/logo-camel-medium-372cf8688f.png
deleted file mode 100644
index ab4ed1d9..00000000
Binary files a/antora-ui-camel/public/_/img/logo-camel-medium-372cf8688f.png 
and /dev/null differ
diff --git a/antora-ui-camel/public/_/img/logo-camel-medium-ec76e19c58.png 
b/antora-ui-camel/public/_/img/logo-camel-medium-ec76e19c58.png
new file mode 100644
index 00000000..a98bfd17
Binary files /dev/null and 
b/antora-ui-camel/public/_/img/logo-camel-medium-ec76e19c58.png differ
diff --git a/antora-ui-camel/public/_/partials/article.hbs 
b/antora-ui-camel/public/_/partials/article.hbs
index 55167cab..04e5a5b1 100644
--- a/antora-ui-camel/public/_/partials/article.hbs
+++ b/antora-ui-camel/public/_/partials/article.hbs
@@ -12,6 +12,22 @@ If you typed the URL of this page manually, please double 
check that you entered
 {{#with page.title}}
 <h1 class="page">{{{this}}}</h1>
 {{/with}}
+{{#if page.attributes.deprecated}}
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p><strong>Deprecated:</strong> This {{or page.attributes.shortname 
'component'}} is deprecated and may be removed in a future release.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+{{/if}}
 {{{page.contents}}}
 {{/if}}
 {{> pagination}}
diff --git a/antora-ui-camel/public/_/partials/head-styles.hbs 
b/antora-ui-camel/public/_/partials/head-styles.hbs
index a44655db..8e97f96b 100644
--- a/antora-ui-camel/public/_/partials/head-styles.hbs
+++ b/antora-ui-camel/public/_/partials/head-styles.hbs
@@ -1 +1 @@
-    <link rel="stylesheet" href="{{uiRootPath}}/css/site-2c6491cbb6.css">
+    <link rel="stylesheet" href="{{uiRootPath}}/css/site-e7a3c95ff3.css">
diff --git a/antora-ui-camel/public/_/rev-manifest 
b/antora-ui-camel/public/_/rev-manifest
index 796239f3..6e921ac7 100644
--- a/antora-ui-camel/public/_/rev-manifest
+++ b/antora-ui-camel/public/_/rev-manifest
@@ -1,5 +1,5 @@
 {
-  "css/site.css": "css/site-2c6491cbb6.css",
+  "css/site.css": "css/site-e7a3c95ff3.css",
   "img/algolia.svg": "img/algolia-f4ab98e0de.svg",
   "img/apache-kafka.svg": "img/apache-kafka-88809b7472.svg",
   "img/apache-karaf.svg": "img/apache-karaf-7bdb5ce2e3.svg",
@@ -28,7 +28,7 @@
   "img/karavan.svg": "img/karavan-8621354711.svg",
   "img/knative.svg": "img/knative-5010ee4773.svg",
   "img/kubernetes.svg": "img/kubernetes-07ba46aaa2.svg",
-  "img/logo-camel-medium.png": "img/logo-camel-medium-372cf8688f.png",
+  "img/logo-camel-medium.png": "img/logo-camel-medium-ec76e19c58.png",
   "img/logo-d.svg": "img/logo-d-a567cee6fa.svg",
   "img/menu.svg": "img/menu-8775cec4be.svg",
   "img/quarkus.svg": "img/quarkus-446ffca541.svg",
diff --git a/antora-ui-camel/src/partials/article.hbs 
b/antora-ui-camel/src/partials/article.hbs
index 55167cab..04e5a5b1 100644
--- a/antora-ui-camel/src/partials/article.hbs
+++ b/antora-ui-camel/src/partials/article.hbs
@@ -12,6 +12,22 @@ If you typed the URL of this page manually, please double 
check that you entered
 {{#with page.title}}
 <h1 class="page">{{{this}}}</h1>
 {{/with}}
+{{#if page.attributes.deprecated}}
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p><strong>Deprecated:</strong> This {{or page.attributes.shortname 
'component'}} is deprecated and may be removed in a future release.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+{{/if}}
 {{{page.contents}}}
 {{/if}}
 {{> pagination}}
diff --git a/extensions/promote-deprecated-attribute.js 
b/extensions/promote-deprecated-attribute.js
new file mode 100644
index 00000000..d28027a3
--- /dev/null
+++ b/extensions/promote-deprecated-attribute.js
@@ -0,0 +1,42 @@
+'use strict'
+
+/**
+ * This Antora extension promotes the 'deprecated' and 'supportlevel' AsciiDoc
+ * document attributes to page attributes so they can be accessed in
+ * Handlebars templates as page.attributes.deprecated and 
page.attributes.supportlevel.
+ *
+ * This allows the UI to display warning banners for deprecated components.
+ */
+module.exports.register = function ({ config }) {
+  this.on('documentsConverted', ({ contentCatalog }) => {
+    contentCatalog.getPages().forEach((page) => {
+      if (!page.asciidoc) return
+
+      const attributes = page.asciidoc.attributes
+      if (!attributes) return
+
+      // Initialize page attributes if not present
+      if (!page.asciidoc.attributes['page-deprecated']) {
+        // Check if the page has deprecated attribute
+        if (attributes.deprecated !== undefined) {
+          // Promote deprecated to page-deprecated
+          page.asciidoc.attributes['page-deprecated'] = attributes.deprecated 
|| 'true'
+        }
+      }
+
+      if (!page.asciidoc.attributes['page-supportlevel']) {
+        // Check for supportlevel attribute (e.g., "Stable-deprecated")
+        if (attributes.supportlevel !== undefined) {
+          page.asciidoc.attributes['page-supportlevel'] = 
attributes.supportlevel
+        }
+      }
+
+      if (!page.asciidoc.attributes['page-shortname']) {
+        // Check for shortname attribute (e.g., "nitrite", "component")
+        if (attributes.shortname !== undefined) {
+          page.asciidoc.attributes['page-shortname'] = attributes.shortname
+        }
+      }
+    })
+  })
+}

Reply via email to