edp-doc/live-preview-integration/README-backstage-local.md

1.2 KiB

Backstage docs local

Take this repo when you want to start editing documentation for Backstage techdocs independently from a central docs repo.

For the PoC doc you first can prepare your docs here. Later on they will go into a central docs repo. Then the cebntral docs repo will render and publish the docs into a running backstage app in a eDF platform.

How to

You need nodejs and npx.

Use devbox if you want to keep your host clean

If you need a devboxed nodejs environment, have devbox installed. Then run

devbox shell

When npx is available, run

# in the repo root dir

# use backstage theme and frame
npx @techdocs/cli serve

#use mkdocs theme
npx @techdocs/cli serve:mkdocs

Output

You should see this screen:

alt text

how this repo was generated

# get mocked content from techdocs-container (backsatge/packages/techdocs-cli is too slow to clone)
mkdir tmp && cd tmp
git clone https://github.com/backstage/techdocs-container.git
cp -a mock-docs/* ..
cd ..
rm -rf tmp

# provide nodejs env
devbox init
devbox add yarn nodejs