4.8 KiB
@backstage/techdocs-common
0.3.1
Patch Changes
-
8804e8981: Using @backstage/integration package for GitHub/GitLab/Azure tokens and request options.Most probably you do not have to make any changes in the app because of this change. However, if you are using the
DirectoryPreparerorCommonGitPreparerexported by@backstage/techdocs-commonpackage, you now need to add pass in aconfig(from@backstage/config) instance as argument.<!-- Before --> const directoryPreparer = new DirectoryPreparer(logger); const commonGitPreparer = new CommonGitPreparer(logger); <!-- Now --> const directoryPreparer = new DirectoryPreparer(config, logger); const commonGitPreparer = new CommonGitPreparer(config, logger);
0.3.0
Minor Changes
-
a8573e53b: techdocs-backend: Simplified file, removing individual preparers and generators. techdocs-backend: UrlReader is now available to use in preparers.In your Backstage app,
packages/backend/plugins/techdocs.tsfile has now been simplified, to remove registering individual preparers and generators.Please update the file when upgrading the version of
@backstage/plugin-techdocs-backendpackage.const preparers = await Preparers.fromConfig(config, { logger, reader, }); const generators = await Generators.fromConfig(config, { logger, }); const publisher = await Publisher.fromConfig(config, { logger, discovery, });You should be able to remove unnecessary imports, and just do
import { createRouter, Preparers, Generators, Publisher, } from '@backstage/plugin-techdocs-backend';
0.2.0
Minor Changes
-
dae4f3983: Breaking changes-
Added option to use Google Cloud Storage as a choice to store the static generated files for TechDocs. It can be configured using
techdocs.publisher.typeoption inapp-config.yaml. Step-by-step guide to configure GCS is available here https://backstage.io/docs/features/techdocs/using-cloud-storage Settechdocs.publisher.typeto'local'if you want to continue using local filesystem to store TechDocs files. -
techdocs.builderis now required and can be set to'local'or'external'. (Set it to'local'for now, since CI/CD build workflow for TechDocs will be available soon (in few weeks)). If builder is set to 'local' and you open a TechDocs page,techdocs-backendwill try to generate the docs, publish to storage and show the generated docs afterwords. If builder is set to'external',techdocs-backendwill only fetch the docs and will NOT try to generate and publish. In this case of'external', we assume that docs are being built in the CI/CD pipeline of the repository. TechDocs will not assume a default value fortechdocs.builder. It is better to explicitly define it in theapp-config.yaml. -
When configuring TechDocs in your backend, there is a difference in how a new publisher is created.
--- const publisher = new LocalPublish(logger, discovery); +++ const publisher = Publisher.fromConfig(config, logger, discovery);Based on the config
techdocs.publisher.type, the publisher could be either Local publisher or Google Cloud Storage publisher.-
techdocs.storageUrlis now a required config. Should behttp://localhost:7000/api/techdocs/static/docsin most setups. -
Parts of
@backstage/plugin-techdocs-backendhave been moved to a new package@backstage/techdocs-commonto generate docs. Also to publish docs to-and-fro between TechDocs and a storage (either local or external). However, a Backstage app does NOT need to import thetechdocs-commonpackage - app should only import@backstage/plugin-techdocsand@backstage/plugin-techdocs-backend.
Patch changes
-
See all of TechDocs config options and its documentation https://backstage.io/docs/features/techdocs/configuration
-
Logic about serving static files and metadata retrieval have been abstracted away from the router in
techdocs-backendto the instance of publisher. -
Removed Material UI Spinner from TechDocs header. Spinners cause unnecessary UX distraction. Case 1 (when docs are built and are to be served): Spinners appear for a split second before the name of site shows up. This unnecessarily distracts eyes because spinners increase the size of the Header. A dot (.) would do fine. Definitely more can be done. Case 2 (when docs are being generated): There is already a linear progress bar (which is recommended in Storybook).
-