chore(backstage-doc): added devbox and README for techdocs-cli local development
This commit is contained in:
parent
14145a8855
commit
3411feace7
3 changed files with 91 additions and 0 deletions
22
.vscode/settings.json
vendored
Normal file
22
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"workbench.colorCustomizations": {
|
||||||
|
"activityBar.activeBackground": "#ab307e",
|
||||||
|
"activityBar.background": "#ab307e",
|
||||||
|
"activityBar.foreground": "#e7e7e7",
|
||||||
|
"activityBar.inactiveForeground": "#e7e7e799",
|
||||||
|
"activityBarBadge.background": "#25320e",
|
||||||
|
"activityBarBadge.foreground": "#e7e7e7",
|
||||||
|
"commandCenter.border": "#e7e7e799",
|
||||||
|
"sash.hoverBorder": "#ab307e",
|
||||||
|
"statusBar.background": "#832561",
|
||||||
|
"statusBar.foreground": "#e7e7e7",
|
||||||
|
"statusBarItem.hoverBackground": "#ab307e",
|
||||||
|
"statusBarItem.remoteBackground": "#832561",
|
||||||
|
"statusBarItem.remoteForeground": "#e7e7e7",
|
||||||
|
"titleBar.activeBackground": "#832561",
|
||||||
|
"titleBar.activeForeground": "#e7e7e7",
|
||||||
|
"titleBar.inactiveBackground": "#83256199",
|
||||||
|
"titleBar.inactiveForeground": "#e7e7e799"
|
||||||
|
},
|
||||||
|
"peacock.color": "#832561"
|
||||||
|
}
|
52
README-backstage-local.md
Normal file
52
README-backstage-local.md
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
# 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](https://www.jetify.com/docs/devbox/installing_devbox/). Then run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
devbox shell
|
||||||
|
```
|
||||||
|
|
||||||
|
When npx is available, run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## how this repo was generated
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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
|
||||||
|
```
|
17
devbox.json
Normal file
17
devbox.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.6/.schema/devbox.schema.json",
|
||||||
|
"packages": [
|
||||||
|
"nodejs@latest",
|
||||||
|
"yarn@latest"
|
||||||
|
],
|
||||||
|
"shell": {
|
||||||
|
"init_hook": [
|
||||||
|
"echo 'Welcome to devbox!' > /dev/null"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"test": [
|
||||||
|
"echo \"Error: no test specified\" && exit 1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue