1.0.0-alpha.3 • Published 1 year ago

@antora/collector-extension v1.0.0-alpha.3

Weekly downloads
-
License
MPL-2.0
Repository
gitlab
Last release
1 year ago

Antora Collector Extension

The Antora Collector extension augments the content aggregation capabilities of Antora by allowing you to delegate to external commands that generate content and to import additional files into the content aggregate.

Overview

The Antora Collector extension allows you to designate zero or more external commands (e.g., gradlew generateContent) per content root that generate transient metadata or content within the context of the worktree for a git reference. The extension then scans for and imports files from specified directories into the content aggregate (and, in turn, the content catalog).

Install

Use the following command to install the extension into your playbook project:

$ npm i @antora/collector-extension

Register

Open your Antora playbook file and register the extension as an entry in the antora.extensions key. If this key doesn't yet exist in your playbook, first create it.

antora-playbook.yml

antora:
  extensions:
  - '@antora/collector-extension'

Configure

To configure the extension, you must define at least one run/scan operation under the ext.collector key in a component descriptor.

antora.yml

name: my-project
version: true
# ...
ext:
  collector:
    run:
      command: node generate-files.js
    scan:
      dir: build/generated-files

Copyright and License

Copyright (C) 2022-present by OpenDevise Inc. and the individual contributors of this project.

Use of this software is granted under the terms of the Mozilla Public License Version 2.0 (MPL-2.0).