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
or the source in the [docs-java repository](https://github.com/mongodb/docs-java).
15
15
16
-
## Build Requirements
17
-
18
-
- Intel Mac or x64 PC (for hugo)
19
-
-[hugo v0.25.x](https://github.com/gohugoio/hugo/releases/tag/v0.25.1) (any other version may not generate the documentation correctly)
20
-
- The [https://github.com/mongodb/docs-java-other](docs-java-other) and [https://github.com/mongodb/mongo-java-driver](mongo-java-driver) repos cloned to your local machine (ensure you have appropriate SSH keys to access them)
21
-
22
-
:warning:**If you are running on an Apple M1 CPU, you may not be able to find a working binary for Hugo v0.25.x.** and will need to set up an Ubuntu Docker Image for the linux/amd64 arch. See [docker-java-gh-docs](https://github.com/mongodb/docs-java-other/tree/main/tools/README.md) for information on setting this up.
23
-
24
-
## Build Instructions
25
-
26
-
:warning:**When building docs for a new version, update the following items:**
27
-
-`<this repo>/reference/config.toml` file to point to the new base version
28
-
-`<this repo>/landing/data/releases.toml` file to link to the docs for the new version
29
-
-`<thid repo>/reference/data/mongodb.toml` file to display the mew version
30
-
-`<reference/content/driver-reactive/getting-started/installation.md` and `<reference/content/driver-scala/getting-started/installation.md` files to display the new version
31
-
- Update the "Previous Versions" sections for the Scala and Java RS driver docs which are in ``reference/content/<driver name directory>/index.md``
32
-
- Meta redirects as shown in this PR [Java sync docs redirect](https://github.com/mongodb/docs-java-other/pull/3/files#diff-0f1a8692163867f83ff7451f3018bae71d3d16dbee396abf03263784e5dda940)
33
-
34
-
After updating the documentation, submit a pull request for approval.
35
-
36
-
Once your PR is approved and merged, pull the latest changes.
37
-
Then run the `publish-docs` script with the version using the
38
-
format `<major>.<minor>`:
39
-
40
-
```sh
41
-
./publish-docs <version, e.g. 4.7>
42
-
```
43
-
44
-
This command updates the submodule that tracks the *gh-pages* branch
45
-
of the [mongo-java-driver](https://github.com/mongodb/mongo-java-driver).
46
-
Then it builds the documentation in a new directory that corresponds to the
47
-
new version name.
16
+
**Now that Java RS and Scala documentation is built on Snooty, you do not
17
+
have to update the legacy documentation site.**
48
18
49
19
## Building API Documentation
50
20
51
21
Always build the API docs for any new major and minor releases.
52
22
53
-
To build the API docs, navigate to your `mongo-java-driver` repo
54
-
(*Note: NOT the submodule in this repo*) and executing the appropriate `gradlew` command
55
-
after checking out the correct tag. Ensure you installed the Java version specified in the `:bson:compileJava` task in your development environment prior to building.
23
+
To build the API docs, navigate to your `mongo-java-driver` repo
24
+
(_Note: NOT the submodule in this repo_) and execute the appropriate `gradlew` command
25
+
after checking out the correct tag. Ensure you installed the Java
26
+
version specified in the `:bson:compileJava` task in your development
27
+
environment prior to building. In the most recent (5/2024) deploy, this
28
+
was Java 17.
56
29
57
-
:warning:**Use the GitHub "release" that correspond to the version of the driver rather than a branch**
30
+
:warning:**Use the GitHub "release" that corresponds to the version of the driver rather than a branch**
58
31
59
-
For example, to build the API docs for the 4.4 release of driver run the following commands:
32
+
For example, to build the API docs for the 4.4 release of the driver run the following commands:
60
33
61
34
```sh
62
35
git checkout r4.4.0
63
36
./gradlew clean docs
64
37
```
65
38
39
+
You need to create the `<version>/apidocs` directory yourself before
40
+
copying the generated API docs files.
41
+
42
+
Run the following commands to create the `apidocs` directory:
43
+
44
+
````sh
45
+
cd docs-java-other/mongo-java-driver
46
+
mkdir -p <version>/apidocs
47
+
```
48
+
66
49
Then copy the `build/docs` folder into the `apidocs` directory. For example,
67
50
if the `mongo-java-driver` repo is on a sibling level with this repo, run the following command:
68
51
69
52
```sh
70
53
cp -a ../mongo-java-driver/build/docs ./mongo-java-driver/<version>/apidocs
71
-
```
54
+
````
72
55
73
56
Your submodule directory should contain a directory structure that resembles the following:
0 commit comments