Skip to content

Commit db6cc06

Browse files
committed
docs: reword the Nginx guide, close #936
1 parent e848da0 commit db6cc06

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ If you want to also work on the other parts of the docs, you may want to first j
101101

102102
### Join all the docs repos together using Nginx
103103

104-
All the links in the navbar and footer need to be absolute, and they will use a different hostname, configured to `docs.apify.loc` - to use that, follow the steps below and set up the Nginx server.
104+
By default, the parts of the docs sourced from other repositories will give you 404s. If you need to locally run the project with all the other repositories included, clone them all and setup an Nginx server according to the steps below.
105105

106-
Alternatively, you can skip the Nginx part and navigate to <http://localhost:3000/academy> or <http://localhost:3000/platform> manually instead of using links in the navbar. All relative links should work fine there. The problem with absolute links is only with shared components. The Nginx server is needed only for testing the whole setup and mapping all the different ports to a single one.
107-
108-
Clone all the repositories, and start the Docusaurus instances in them.
106+
For the setup to work, use `npm start:dev` instead of `npm start` when starting `apify-docs`.
107+
This causes all links in the top navigation and the footer to be absolute.
108+
They will now use `docs.apify.loc` as a host.
109+
Clone all the remaining docs repositories, and start their Docusaurus instances.
110+
To run Docusaurus on a specific port, use `npm start -- --port XXXX`.
109111

110112
| repo | port |
111113
|---------------------|------|
@@ -116,9 +118,7 @@ Clone all the repositories, and start the Docusaurus instances in them.
116118
| apify-sdk-python | 3004 |
117119
| apify-cli | 3005 |
118120

119-
> To run Docusaurus on a specific port, use `npm start -- --port XXXX`.
120-
121-
To route them, you will need an Nginx server with the following config:
121+
To serve them together as a single website, setup an Nginx server with the following config:
122122

123123
```nginx
124124
server {
@@ -145,12 +145,14 @@ server {
145145
}
146146
```
147147

148-
And add a record to `/etc/hosts` to map the `docs.apify.loc` hostname to localhost:
148+
Add a record to `/etc/hosts`, which maps the `docs.apify.loc` host to a localhost:
149149

150150
```text
151151
127.0.0.1 docs.apify.loc
152152
```
153153

154+
Now you should be able to open <http://docs.apify.loc> in your browser and see all the documentation projects joined together, with the top navigation allowing you to browse not only Academy or Platform docs, but also CLI, SDK, and all the other docs.
155+
154156
## Linting
155157

156158
### Markdown and code

0 commit comments

Comments
 (0)