Skip to content

Conversation

@kmahar
Copy link
Contributor

@kmahar kmahar commented Feb 26, 2020

This adds a new script which handles generating documentation for both of our modules along with a pretty bare bones index page containing links to both.

It is very likely that this script does not work on Linux. A lot of the extra stuff in the SwiftNIO script is for that. But I don't want to hold up the release on getting the script to work there so I've left it out for now.

FYI: A follow up commit will be needed that cleans up everything in the docs/ directory besides the new README.md and the edited index.html, but I figured I would just merge that in directly after this, rather than cluttering up the PR.

If you want to check out how all this looks locally I would suggest doing that deletion manually and then running the script.

@kmahar kmahar requested a review from patrickfreed February 26, 2020 23:24
--github_url https://github.com/mongodb/mongo-swift-driver
--theme fullwidth
--documentation "Guides/*.md"
--github-file-prefix https://github.com/mongodb/mongo-swift-driver/tree/v${version}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes it so, if someone clicks one of the "view on github" links in the docs, it will take them to the place the code was at the time of the tag, rather than on master.

docs/index.html Outdated
</body>
</div>
</html>
<html><head><meta http-equiv="refresh" content="0; url=mongoswift/index.html" /></head></html>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from NIO. this makes it so if you go to the main documentation URL it forwards you to the MongoSwift docs main page (which has the README listing the modules).

Copy link
Contributor

@patrickfreed patrickfreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have a Linux machine with me right now, so I can't verify what everything looks like. That said, it all seems good to me besides one small typo in the development guide.

Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver.

If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`.
If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `.etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: should be ./etc/generate-docs.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, fixed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to push the commit

Copy link
Contributor Author

@kmahar kmahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh duh, I even saw you pack that laptop lol. trying to upload a zip file of the docs here and failing so I'll slack to you...

Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver.

If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`.
If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `.etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, fixed

Copy link
Contributor

@patrickfreed patrickfreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rendered documentation looked good, but since Linux filesystems are case-sensitive, I needed to change the mongoswift/index.html to MongoSwift/index.html to get it to work.

Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver.

If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`.
If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `.etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to push the commit

@kmahar
Copy link
Contributor Author

kmahar commented Feb 27, 2020

pushed the commit from before, and also updated the path in index.html to have the correct case.

docs/README.md Outdated

The MongoDB Swift driver contains two modules:

- [MongoSwift](../mongoswift/index.html), containing an asynchronous API and a BSON library
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just realized these may need to be updated too. Otherwise lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@kmahar kmahar merged commit cc89206 into 1.0.0-rc-changes Feb 27, 2020
@kmahar kmahar deleted the fix-doc-generation branch February 27, 2020 01:21
kmahar added a commit that referenced this pull request Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants