You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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
101
101
102
102
### Join all the docs repos together using Nginx
103
103
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.
105
105
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`.
109
111
110
112
| repo | port |
111
113
|---------------------|------|
@@ -116,9 +118,7 @@ Clone all the repositories, and start the Docusaurus instances in them.
116
118
| apify-sdk-python | 3004 |
117
119
| apify-cli | 3005 |
118
120
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:
122
122
123
123
```nginx
124
124
server {
@@ -145,12 +145,14 @@ server {
145
145
}
146
146
```
147
147
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:
149
149
150
150
```text
151
151
127.0.0.1 docs.apify.loc
152
152
```
153
153
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.
0 commit comments