Skip to main content
Version: Next

@backstage/plugin-techdocs-node

Home > @backstage/plugin-techdocs-node

Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli

Classes

Class

Description

DirectoryPreparer

Preparer used to retrieve documentation files from a local directory

Generators

Collection of docs generators

Preparers

Collection of docs preparers (dir and url)

Publisher

Factory class to create a TechDocs publisher based on defined publisher type in app config. Uses techdocs.publisher.type.

TechdocsGenerator

Generates documentation files

UrlPreparer

Preparer used to retrieve documentation files from a remote repository

Functions

Function

Description

getDocFilesFromRepository(reader, entity, opts)

Returns a preparer response PreparerResponse

getLocationForEntity(entity, scmIntegration)

Returns an entity reference based on the TechDocs annotation type

getMkdocsYml(inputDir, options)

Finds and loads the contents of an mkdocs.yml, mkdocs.yaml file, a file with a specified name or an ad-hoc created file with minimal config.

getMkDocsYml(inputDir, options)

parseReferenceAnnotation(annotationName, entity)

Returns a parsed locations annotation

transformDirLocation(entity, dirAnnotation, scmIntegrations)

TechDocs references of type dir are relative the source location of the entity. This function transforms relative references to absolute ones, based on the location the entity was ingested from. If the entity was registered by a url location, it returns a url location with a resolved target that points to the targeted subfolder. If the entity was registered by a file location, it returns an absolute dir location.

Interfaces

Interface

Description

DocsBuildStrategy

A strategy for when to build TechDocs locally, and when to skip building TechDocs (allowing for an external build)

PublisherBase

Base class for a TechDocs publisher (e.g. Local, Google GCS Bucket, AWS S3, etc.) The publisher handles publishing of the generated static files after the prepare and generate steps of TechDocs. It also provides APIs to communicate with the storage service.

PublisherSettings

Additional configurations for publishers.

TechdocsBuildsExtensionPoint

Extension point type for configuring TechDocs builds.

TechDocsContainerRunner

Handles the running of containers to generate TechDocs.

Custom implementations, e.g. for Kubernetes or other execution environments, can be inspired by the internal default implementation DockerContainerRunner.

TechDocsDocument

TechDocs indexable document interface

TechdocsGeneratorExtensionPoint

Extension point type for configuring a custom TechDocs generator

TechdocsPreparerExtensionPoint

Extension point type for configuring a custom TechDocs preparer

TechdocsPublisherExtensionPoint

Extension point type for configuring a custom TechDocs publisher

Variables

Variable

Description

techdocsBuildsExtensionPoint

Extension point for configuring TechDocs builds.

techdocsGeneratorExtensionPoint

Extension point for configuring a custom TechDocs generator

techdocsPreparerExtensionPoint

Extension point for configuring a custom TechDocs preparer

techdocsPublisherExtensionPoint

Extension point for configuring a custom TechDocs publisher

Type Aliases

Type Alias

Description

ETag

A unique identifier of the tree blob, usually the commit SHA or etag from the target.

GeneratorBase

Generates documentation files

GeneratorBuilder

The generator builder holds the generator ready for run time

GeneratorOptions

Options for building generators

GeneratorRunOptions

The values that the generator will receive.

MigrateRequest

TechDocs entity triplet migration request

ParsedLocationAnnotation

Parsed location annotation

PreparerBase

Definition of a TechDocs preparer

PreparerBuilder

Definition for a TechDocs preparer builder

PreparerConfig

Options for building preparers

PreparerOptions

Options for configuring the content preparation process.

PreparerResponse

Result of the preparation step.

PublisherBuilder

Definition for a TechDocs publisher builder

PublisherFactory

Options for building publishers

PublisherType

Key for all the different types of TechDocs publishers that are supported.

PublishRequest

Request publish definition

PublishResponse

Response containing metadata about where files were published and what may have been published or updated.

ReadinessResponse

Result for the validation check.

RemoteProtocol

Location where documentation files are stored

SupportedGeneratorKey

List of supported generator options

TechDocsMetadata

Type to hold metadata found in techdocs_metadata.json and associated with each site