Merge pull request #16601 from zjpersc/techdocs-global

Adding Global Agent to techdocs-cli
This commit is contained in:
Fredrik Adelöw
2023-03-15 11:40:14 +01:00
committed by GitHub
5 changed files with 24 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@techdocs/cli': patch
---
Adding global-agent to enable the ability to publish through a proxy
+9
View File
@@ -200,6 +200,15 @@ Options:
-h, --help display help for command
```
#### Publishing from behind a proxy
For users attempting to publish TechDocs content behind a proxy, the TechDocs CLI leverages `global-agent` to navigate the proxy to successfully connect to that location. To enable `global-agent`, the following variables need to be set prior to running the techdocs-cli command:
```bash
export GLOBAL_AGENT_HTTPS_PROXY=${HTTP_PROXY}
export GLOBAL_AGENT_NO_PROXY=${NO_PROXY}
```
### Migrate content for case-insensitive access
Prior to the beta version of TechDocs (`v[0.11.0]`), TechDocs were stored in
+8
View File
@@ -40,6 +40,14 @@ yarn start
yarn techdocs-cli:dev [...options]
```
### Connecting behind a proxy
```sh
# Prior to executing the techdocs-cli command
export GLOBAL_AGENT_HTTPS_PROXY=${HTTP_PROXY}
export GLOBAL_AGENT_NO_PROXY=${NO_PROXY}
```
### 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.
+1
View File
@@ -69,6 +69,7 @@
"commander": "^9.1.0",
"dockerode": "^3.3.1",
"fs-extra": "^10.0.1",
"global-agent": "^3.0.0",
"http-proxy": "^1.18.1",
"react-dev-utils": "^12.0.0-next.60",
"serve-handler": "^6.1.3",
+1
View File
@@ -13793,6 +13793,7 @@ __metadata:
dockerode: ^3.3.1
find-process: ^1.4.5
fs-extra: ^10.0.1
global-agent: ^3.0.0
http-proxy: ^1.18.1
nodemon: ^2.0.2
react-dev-utils: ^12.0.0-next.60