techdocs-cli: Build, preview and publish Backstage TechDocs sites (@techdocs/cli 1.13)
techdocs-cli <command> [options]
What it does
The TechDocs generator outside Backstage: generate runs MkDocs (in the spotify/techdocs container by default) with the techdocs-core plugin over a repository's mkdocs.yml and docs/, publish uploads the result to the object storage Backstage reads in the recommended setup (CI builds, Backstage only serves). Usually run as npx @techdocs/cli <command>.
Options you will use
-V, --version- Output the version number.
-h, --help- Display help for command.
Examples
$ npx @techdocs/cli generate --source-dir . --output-dir ./sitebuild in the spotify/techdocs container
$ npx @techdocs/cli publish --publisher-type awsS3 --storage-name techdocs --entity default/Component/ordersupload ./site/ for one entity
Gotchas
- generate patches mkdocs.yml in the source directory when the techdocs-core plugin is missing (unless --omitTechdocsCoreMkdocsPlugin).
- --legacyCopyReadmeMdToIndexMd: with no docs/index.md the generator warns and copies docs/README.md or README.md to docs/index.md in your source tree.
- The Docker image is pulled before every run unless --no-pull; --no-docker needs mkdocs and mkdocs-techdocs-core installed locally (pip).
Try techdocs-cli in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.