@antora/content-classifier 3.2.0-alpha.5 → 3.2.0-alpha.6

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.
@@ -156,13 +156,19 @@ function getNavInfo (filepath, nav) {
156
156
  if (~index) return nav.resolved.add(filepath) && { index }
157
157
  }
158
158
 
159
- function resolveAsciiDocConfig (siteAsciiDocConfig, { asciidoc, origins = [] }) {
159
+ function resolveAsciiDocConfig (siteAsciiDocConfig, { name, version, asciidoc, origins = [] }) {
160
160
  const scopedAttributes = (asciidoc || {}).attributes
161
161
  if (scopedAttributes) {
162
- const initial = siteAsciiDocConfig.attributes
162
+ const initial = Object.assign({}, siteAsciiDocConfig.attributes)
163
+ initial['antora-component-name'] = name
164
+ initial['antora-component-version'] = version
163
165
  const mdc = { file: { path: 'antora.yml', origin: origins[origins.length - 1] } }
164
166
  const attributes = collateAsciiDocAttributes(scopedAttributes, { initial, mdc, merge: true })
165
- if (attributes !== initial) return Object.assign({}, siteAsciiDocConfig, { attributes })
167
+ if (attributes !== initial) {
168
+ delete attributes['antora-component-name']
169
+ delete attributes['antora-component-version']
170
+ return Object.assign({}, siteAsciiDocConfig, { attributes })
171
+ }
166
172
  }
167
173
  return siteAsciiDocConfig
168
174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/content-classifier",
3
- "version": "3.2.0-alpha.5",
3
+ "version": "3.2.0-alpha.6",
4
4
  "description": "Organizes aggregated content into a virtual file catalog for use in an Antora documentation pipeline.",
5
5
  "license": "MPL-2.0",
6
6
  "author": "OpenDevise Inc. (https://opendevise.com)",
@@ -27,8 +27,8 @@
27
27
  "#constants": "./lib/constants.js"
28
28
  },
29
29
  "dependencies": {
30
- "@antora/asciidoc-loader": "3.2.0-alpha.5",
31
- "@antora/logger": "3.2.0-alpha.5",
30
+ "@antora/asciidoc-loader": "3.2.0-alpha.6",
31
+ "@antora/logger": "3.2.0-alpha.6",
32
32
  "mime-types": "~2.1",
33
33
  "vinyl": "~3.0"
34
34
  },