@redpanda-data/docs-extensions-and-macros 4.11.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,8 @@ module.exports.register = function () {
54
54
  'pagination',
55
55
  'footer',
56
56
  'nav-expand',
57
- 'banner-container'
57
+ 'banner-container',
58
+ 'markdown-dropdown',
58
59
  ]
59
60
  return toRemove.some(
60
61
  (x) => classAttr.includes(x) || idAttr.includes(x)
@@ -250,6 +251,21 @@ module.exports.register = function () {
250
251
  return outerTurndown
251
252
  }
252
253
 
254
+ // Add marker attribute before UI rendering so templates can detect markdown availability
255
+ this.on('documentsConverted', ({ contentCatalog }) => {
256
+ const pages = contentCatalog.findBy({ family: 'page' })
257
+ logger.info(`Marking ${pages.length} pages as having markdown equivalents...`)
258
+
259
+ pages.forEach((page) => {
260
+ // Ensure attributes object exists
261
+ if (!page.asciidoc) page.asciidoc = {}
262
+ if (!page.asciidoc.attributes) page.asciidoc.attributes = {}
263
+
264
+ // Add marker that UI templates can check
265
+ page.asciidoc.attributes['page-has-markdown'] = ''
266
+ })
267
+ })
268
+
253
269
  // Conversion pipeline
254
270
  this.on('pagesComposed', async ({ playbook: pb, contentCatalog }) => {
255
271
  playbook = pb
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redpanda-data/docs-extensions-and-macros",
3
- "version": "4.11.0",
3
+ "version": "4.11.1",
4
4
  "description": "Antora extensions and macros developed for Redpanda documentation.",
5
5
  "keywords": [
6
6
  "antora",