@redpanda-data/docs-extensions-and-macros 3.0.10 → 3.0.12
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.
|
@@ -66,7 +66,7 @@ module.exports.register = function ({ config }) {
|
|
|
66
66
|
|
|
67
67
|
console.log(chalk.green(`Merged terms into glossary for ${component} component${version? version: ''}.`));
|
|
68
68
|
} else {
|
|
69
|
-
logger.
|
|
69
|
+
logger.info(`Skipping ${title} ${version} - No glossary page (reference:glossary.adoc) found`)
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -111,8 +111,8 @@ function generateIndex (playbook, contentCatalog, { indexLatestOnly = false, exc
|
|
|
111
111
|
// handle titles
|
|
112
112
|
const h1 = article.querySelector('h1')
|
|
113
113
|
if (!h1) {
|
|
114
|
-
logger.
|
|
115
|
-
|
|
114
|
+
logger.warn(`No H1 in ${page.pub.url}...skipping`)
|
|
115
|
+
continue
|
|
116
116
|
}
|
|
117
117
|
const documentTitle = h1.text
|
|
118
118
|
h1.remove()
|
|
@@ -12,7 +12,6 @@ module.exports.register = function ({ config }) {
|
|
|
12
12
|
for (const attachment of attachments) {
|
|
13
13
|
let contentString = attachment['_contents'].toString('utf8');
|
|
14
14
|
if (!asciidoc.attributes) continue
|
|
15
|
-
if (!asciidoc.attributes.hasOwnProperty('replace-attributes-in-attachments')) continue;
|
|
16
15
|
for (const key in asciidoc.attributes) {
|
|
17
16
|
const placeholder = "{" + key + "}";
|
|
18
17
|
const sanitizedValue = sanitizeAttributeValue(asciidoc.attributes[key]);
|
package/macros/glossary.js
CHANGED
|
@@ -135,7 +135,7 @@ module.exports.register = function (registry, config = {}) {
|
|
|
135
135
|
const termExistsInContext = context.gloss.some((candidate) => candidate.term === term);
|
|
136
136
|
if ((termExistsInContext && links) || (links && customLink)) {
|
|
137
137
|
inline = customLink
|
|
138
|
-
? self.createInline(parent, 'anchor', target, { type: 'link', target: customLink, attributes: attrs })
|
|
138
|
+
? self.createInline(parent, 'anchor', target, { type: 'link', target: customLink, attributes: { ...attrs, window: '_blank', rel: 'noopener noreferrer' } })
|
|
139
139
|
: self.createInline(parent, 'anchor', target, { type: 'xref', target: `${glossaryPage}#${termId(term)}`, reftext: target, attributes: attrs })
|
|
140
140
|
} else {
|
|
141
141
|
inline = self.createInline(parent, 'quoted', target, { attributes: attrs })
|