980b7f5632
All Node.js versions in Backstage's support matrix (v22 and v24 LTS) include built-in proxy support via NODE_USE_ENV_PROXY, making the legacy global-agent/undici workarounds unnecessary. Remove the legacy proxy guide from contrib/ and all references to the legacy approach across the docs. Signed-off-by: Jon Koops <jonkoops@gmail.com>
2.1 KiB
2.1 KiB
techdocs-cli
Usage
Development
NOTE: When we build techdocs-cli it copies the output techdocs-cli-embedded-app
bundle into the packages/techdocs-cli/dist which is then published with the
@techdocs/cli npm package.
Running
# From the root of this repository run
# NOTE: This will build the techdocs-cli-embedded-app and copy the output into the cli dist directory
yarn workspace @techdocs/cli build
# Now execute the binary
packages/techdocs-cli/bin/techdocs-cli
# ... or as a shell alias in ~/.zshrc or ~/.zprofile or ~/.bashrc or similar
export PATH=/path/to/backstage/packages/techdocs-cli/bin:$PATH
If you want to test live test changes to the packages/techdocs-cli-embedded-app
you can serve the app and run the CLI using the following commands:
# Open a shell to the techdocs-cli-embedded-app directory
cd packages/techdocs-cli-embedded-app
# Run the techdocs-cli-embedded-app using dev mode
yarn start
# In another shell use the techdocs-cli from the root of this repo
yarn techdocs-cli:dev [...options]
Connecting behind a proxy
# Prior to executing the techdocs-cli command
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,internal.company.com
export NODE_USE_ENV_PROXY=1
Using an example docs project
For the purpose of local development, we have created an example documentation project. You are of course also free to create your own local test site - all it takes is a docs/index.md and an mkdocs.yml in a directory.
cd packages/techdocs-cli/src/example-docs
# To get a view of your docs in Backstage, use:
techdocs-cli serve
# To view the raw mkdocs site (without Backstage), use:
techdocs-cli serve:mkdocs
Testing
E2E tests
Running unit tests requires mkdocs to be installed locally:
pip install mkdocs
pip install mkdocs-techdocs-core
Then run yarn test.