GaneshPatil7517 opened a new pull request, #1479:
URL: https://github.com/apache/camel-website/pull/1479

   This PR implements automatic rendering of a WARNING section on documentation 
pages when the page metadata marks the component (or language, data format, 
misc) as deprecated.
   
   When a documentation page includes the `:deprecated:` attribute in its 
AsciiDoc header, a prominent warning block will automatically appear at the top 
of the page (below the title), alerting users that the documented 
component/feature is deprecated.
   
   ## Changes
   
   Modified `antora-ui-camel/src/partials/article.hbs` to conditionally render 
a deprecation warning block:
   
   - Checks if the page has the `deprecated` attribute set
   - Renders an AsciiDoc-style WARNING admonition block with consistent styling
   - Uses the component's `:shortname:` if available, otherwise falls back to 
the page title
   - No manual changes required in individual AsciiDoc files
   - Applies to all documentation types: components, languages, data formats, 
misc
   
   ## Implementation Details
   
   The solution:
   1. Uses Handlebars' `{{#unless}}` block to check if the deprecated attribute 
is undefined
   2. Renders the warning using the existing admonition block styling 
(`.admonitionblock.warning`)
   3. Follows the Antora/AsciiDoc standard table structure for admonitions
   4. Leverages the `{{or}}` helper to display shortname or fallback to page 
title
   
   ## Example
   
   For a page with:
   ```asciidoc
   = My Component
   :shortname: mycomponent
   :deprecated: true
   ```
   
   The rendered page will display:
   ```
   ┌──────────────────────────────────────────┐
   │ ⚠️  Warning                                                                
                        │
   │ This mycomponent is deprecated                                             
          │
   └──────────────────────────────────────────┘
   ```
   
   ## Testing
   
   Locally tested:
   - Built the Antora UI and website with the template changes
   - Verified that pages with `:deprecated: true` show the warning
   - Confirmed non-deprecated pages remain unchanged
   - CSS styling from existing admonition block styles is applied correctly
   
   Fix #1477
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to